Compile fix: convert argument to long to match parameter comparison

GCC creates a warning "enumeral and non-enumeral type in conditional
expression" as the types of the two arguments don't match. Fix
the compile warning by converting the first argument to (long) to match
the type of the second parameter.

Fix confirmed to work on NetBSD and FreeBSD, obtained from
Kamil Rytarowski <n54@gmx.com>, NetBSD qt ports maintainer.

Change-Id: I777dd066a0a8cc8a46e34bd39b256882080a7773
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Ralf Nolden 2016-05-22 13:59:27 +02:00
parent 14ae00dd50
commit 9b153f989b

View File

@ -2159,7 +2159,7 @@ static int qt_timezone()
// number of seconds west of UTC.
// - It also takes DST into account, so we need to adjust it to always
// get the Standard Time offset.
return -t.tm_gmtoff + (t.tm_isdst ? SECS_PER_HOUR : 0L);
return -t.tm_gmtoff + (t.tm_isdst ? (long)SECS_PER_HOUR : 0L);
#else
return timezone;
#endif // Q_OS_WIN