Clean up build warnings (#4169)

* [build][OSX] Fix clang warnings.

* [build][OSX] A few more warnings taken care of.

* [build] Fixed yet more build warnings across all platforms.

* [build] Fix final warning due to bad CMake flag.

* [build] Remove unused variables as requested, fix indent.

* Fix output display limit type for 8-bit targets.
This commit is contained in:
Max Paperno
2016-12-30 18:16:11 +01:00
committed by Bertrand Songis
parent 1666fd7355
commit 1eead1504c
22 changed files with 39 additions and 40 deletions
+1 -1
View File
@@ -187,7 +187,7 @@ static inline gtime_t ydhms_diff(long int year1, long int yday1, int hour1, int
int year0, int yday0, int hour0, int min0, int sec0)
{
static_assert(-1 / 2 == 0, "no C99 integer division");
static_assert(INT_MAX <= LONG_MAX / 2 || TIME_T_MAX <= UINT_MAX, "long int year and yday are not wide enough");
static_assert(INT_MAX <= LONG_MAX / 2 || TIME_T_MAX <= INT_MAX, "long int year and yday are not wide enough");
/* Compute intervening leap days correctly even if year is negative.
Take care to avoid integer overflow here. */