[Git][NTPsec/ntpsec][master] 2 commits: Add note about why -Wformat was disabled.

Amar Takhar gitlab at mg.gitlab.com
Fri Dec 4 19:32:02 UTC 2015


Amar Takhar pushed to branch master at NTPsec / ntpsec


Commits:
42d27e88 by Amar Takhar at 2015-12-04T14:27:04Z
Add note about why -Wformat was disabled.

- - - - -
d19992d7 by Amar Takhar at 2015-12-04T14:30:30Z
Wrap format_errmsgHangingPercent runner under VSNPRINTF_PERCENT_M.

- - - - -


1 changed file:

- tests/libntp/msyslog.c


Changes:

=====================================
tests/libntp/msyslog.c
=====================================
--- a/tests/libntp/msyslog.c
+++ b/tests/libntp/msyslog.c
@@ -89,6 +89,7 @@ TEST(msyslog, msnprintfHangingPercent)
 
 	ZERO(exp_buf);
 	ZERO(act_buf);
+/* warning: format string contains '\0' within the string body [-Wformat] */
 #pragma clang diagnostic push
 #pragma clang diagnostic ignored "-Wformat"
 	exp_cnt = snprintf(exp_buf, sizeof(exp_buf), "percent then nul term then non-nul %\0oops!");
@@ -152,7 +153,9 @@ TEST_GROUP_RUNNER(msyslog) {
 	RUN_TEST_CASE(msyslog, msnprintfBackslashLiteralPercentm)
 	RUN_TEST_CASE(msyslog, msnprintfBackslashPercent)
 	RUN_TEST_CASE(msyslog, msnprintfHangingPercent)
+#ifndef VSNPRINTF_PERCENT_M
 	RUN_TEST_CASE(msyslog, format_errmsgHangingPercent)
+#endif
 	RUN_TEST_CASE(msyslog, msnprintfNullTarget)
 	RUN_TEST_CASE(msyslog, msnprintfTruncate)
 }



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/compare/fd11ac0cbcfac9a0f693a9dcca1088a9cbf2fc1a...d19992d7a133f3dbd650d24b00157588c309663f
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ntpsec.org/pipermail/vc/attachments/20151204/c5352054/attachment.html>


More information about the vc mailing list