Changeset: 0875f14472fc for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/0875f14472fc
Modified Files:
gdk/gdk_time.c
Branch: default
Log Message:
Ignore incorrect warning on older gcc.
diffs (14 lines):
diff --git a/gdk/gdk_time.c b/gdk/gdk_time.c
--- a/gdk/gdk_time.c
+++ b/gdk/gdk_time.c
@@ -846,6 +846,10 @@ 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 */
+_Pragma("GCC diagnostic ignored \"-Wformat-truncation\"")
+#endif
return snprintf(buf, len, "%02d:%02d:%02d.%0*d", hour, min,
sec, precision, usec);
} else {
ssize_t l = snprintf(buf, len, "%02d:%02d:%02d.%06d", hour,
min, sec, usec);
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]