summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorRalf Nolden <nolden@kde.org>2016-05-22 13:59:27 +0200
committerRalf Nolden <nolden@kde.org>2016-05-23 09:51:22 +0000
commit9b153f989bcc40fed85d5cbd8a489c6e0eb5c9c7 (patch)
tree778c61d3f7fb7c11b912f57c17d152083e720851 /src/corelib
parent14ae00dd50ed4a75c2efa0b34da971b0e252e124 (diff)
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>
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/tools/qdatetime.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/tools/qdatetime.cpp b/src/corelib/tools/qdatetime.cpp
index 491ed99301..29c8dbb2ea 100644
--- a/src/corelib/tools/qdatetime.cpp
+++ b/src/corelib/tools/qdatetime.cpp
@@ -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