git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] wt-status.c: disable those distracting -Wformat-zero-length warnings

From
Samuel Bronson <naesten@gmail.com>
Date
Dec 20, 2013, 15:45 UTC
Message-ID
<1387554301-23901-1-git-send-email-naesten@gmail.com>
These warnings don't really seem to make much sense for this file.
Signed-off-by: Samuel Bronson <naesten@gmail.com>
---
 wt-status.c | 5 +++++
 1 file changed, 5 insertions(+)
diff --git a/wt-status.c b/wt-status.c
index 4e55810..542cc65 100644
--- a/wt-status.c
+++ b/wt-status.c
@@ -17,6 +17,11 @@
 #include "strbuf.h"
 #include "utf8.h"
 
+/* We have good reasons for using zero-length format strings, and
+ * there's unfortunately no way to turn this off on a per-function
+ * basis ... */
+#pragma GCC diagnostic ignored "-Wformat-zero-length"
+
 static char cut_line[] =
 "------------------------ >8 ------------------------\n";
 
-- 
1.8.4.3
Next: Jeff King
Message 1 of 3 in “wt-status.c: disable those distracting -Wformat-zero-length warnings”
  1. wt-status.c: disable those distracting -Wformat-zero-length warningsSamuel Bronson, Dec 20, 2013
  2. Jeff KingDec 21, 2013
  3. Samuel BronsonDec 21, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.