[Git][NTPsec/ntpsec][master] Hack to compile tests/libntp/msyslog.c on NetBSD

Hal Murray gitlab at mg.gitlab.com
Fri Dec 18 01:32:53 UTC 2015


Hal Murray pushed to branch master at NTPsec / ntpsec


Commits:
09a17ef3 by Hal Murray at 2015-12-17T17:29:21Z
Hack to compile tests/libntp/msyslog.c on NetBSD

- - - - -


1 changed file:

- tests/libntp/msyslog.c


Changes:

=====================================
tests/libntp/msyslog.c
=====================================
--- a/tests/libntp/msyslog.c
+++ b/tests/libntp/msyslog.c
@@ -94,10 +94,12 @@ TEST(msyslog, msnprintfHangingPercent)
 #  pragma clang diagnostic push
 #  pragma clang diagnostic ignored "-Wformat"
 #else /* GCC */
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wformat-contains-nul"
-#pragma GCC diagnostic ignored "-Wformat="
-#pragma GCC diagnostic ignored "-Wformat"
+#ifndef __netbsd__
+# pragma GCC diagnostic push
+# pragma GCC diagnostic ignored "-Wformat-contains-nul"
+# pragma GCC diagnostic ignored "-Wformat="
+# pragma GCC diagnostic ignored "-Wformat"
+#endif
 #endif
 	exp_cnt = snprintf(exp_buf, sizeof(exp_buf), "percent then nul term then non-nul %\0oops!");
 	act_cnt = msnprintf(act_buf, sizeof(act_buf), "percent then nul term then non-nul %\0oops!");



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/09a17ef343870fffee45acf2d0798c2e28005156
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ntpsec.org/pipermail/vc/attachments/20151218/b47a0214/attachment.html>


More information about the vc mailing list