]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Revert "Try to squelch a warning about non-constant format strings."
authorGuy Harris <[email protected]>
Tue, 11 Dec 2018 06:01:39 +0000 (22:01 -0800)
committerGuy Harris <[email protected]>
Tue, 11 Dec 2018 06:01:39 +0000 (22:01 -0800)
This reverts commit 76ed0bb39212d964946a22380288c34adc09030f.

It doesn't help.

We may just want to suppress the warning, as in "trust us, we know what
we're doing", although it'd be nice if the format string passed to those
functions could be checked to make sure it is one that takes exactly one
integer argument.

netdissect.h

index 58e860ff7e20d7e457dc94fff03cbdf2d6eda802..0bacbfc7c1bb15cb1a3c88a80b281858f380aa01 100644 (file)
@@ -139,15 +139,13 @@ struct tok {
        const char *s;          /* string */
 };
 
-extern const char *tok2strbuf(const struct tok *, FORMAT_STRING(const char *),
-                             u_int, char *buf, size_t bufsize);
+extern const char *tok2strbuf(const struct tok *, const char *, u_int,
+                             char *buf, size_t bufsize);
 
 /* tok2str is deprecated */
-extern const char *tok2str(const struct tok *, FORMAT_STRING(const char *),
-                          u_int);
-extern char *bittok2str(const struct tok *, FORMAT_STRING(const char *), u_int);
-extern char *bittok2str_nosep(const struct tok *, FORMAT_STRING(const char *),
-                             u_int);
+extern const char *tok2str(const struct tok *, const char *, u_int);
+extern char *bittok2str(const struct tok *, const char *, u_int);
+extern char *bittok2str_nosep(const struct tok *, const char *, u_int);
 
 /* Initialize netdissect. */
 extern int nd_init(char *, size_t);