From 415c35a5f75f1192561fe1426465bbfcf0f30d65 Mon Sep 17 00:00:00 2001 From: Greg Dennis Date: Fri, 14 Apr 2017 05:21:45 -0400 Subject: Initialize safe_year in time64.c Clang fails with stricter compilation options, because it thinks safe_year may be uninitialized at the return statement. The logic prevents it from being uninitialized, but probably worth the initialization to avoid the compiler error. The rest of libimobiledevice compiles successfully under the same options.--- src/time64.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/time64.c b/src/time64.c index 371f2f9..8c08caf 100644 --- a/src/time64.c +++ b/src/time64.c @@ -346,11 +346,11 @@ static Year cycle_offset(Year year) */ static int safe_year(const Year year) { - int safe_year; + int safe_year= (int)year; Year year_cycle; if( year >= MIN_SAFE_YEAR && year <= MAX_SAFE_YEAR ) { - return (int)year; + return safe_year; } year_cycle = year + cycle_offset(year); -- cgit v1.1-32-gdbae