Commit 415c35a5 authored by Greg Dennis's avatar Greg Dennis Committed by GitHub

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.
parent ff7aecf1
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment