Changeset: 3ec480fc863c for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/3ec480fc863c Modified Files: gdk/gdk_time.c Branch: default Log Message:
Old gcc does not recognize -Wformat-truncation option (and pragma). diffs (15 lines): diff --git a/gdk/gdk_time.c b/gdk/gdk_time.c --- a/gdk/gdk_time.c +++ b/gdk/gdk_time.c @@ -846,8 +846,9 @@ do_daytime_precision_tostr(char *buf, si else if (precision < 6) { for (int i = 6; i > precision; i--) usec /= 10; -#if defined(__GNUC__) && __GNUC__ < 9 -/* the %0*d format gives an incorrect warning in gcc on at least gcc 8.3.1 */ +#if defined(__GNUC__) && __GNUC__ < 9 && __GNUC__ > 4 +/* the %0*d format gives an incorrect warning in gcc on at least gcc 8.3.1 + * old gcc (at least 4.8.5) does not have the option */ GCC_Pragma("GCC diagnostic ignored \"-Wformat-truncation\"") #endif return snprintf(buf, len, "%02d:%02d:%02d.%0*d", hour, min, sec, precision, usec); _______________________________________________ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org