diff options
author | Greg Dennis | 2017-04-14 05:21:45 -0400 |
---|---|---|
committer | GitHub | 2017-04-14 05:21:45 -0400 |
commit | 415c35a5f75f1192561fe1426465bbfcf0f30d65 (patch) | |
tree | 9391e2b6313fc6c5d29853e62de8e4ac18fc9433 /src | |
parent | ff7aecf1127fe9d1aee0ba56a0a6c625667cb396 (diff) | |
download | libplist-415c35a5f75f1192561fe1426465bbfcf0f30d65.tar.gz libplist-415c35a5f75f1192561fe1426465bbfcf0f30d65.tar.bz2 |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/time64.c | 4 |
1 files 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); |