]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Try to squelch a warning about non-constant format strings.
authorGuy Harris <[email protected]>
Tue, 11 Dec 2018 05:53:58 +0000 (21:53 -0800)
committerGuy Harris <[email protected]>
Tue, 11 Dec 2018 05:53:58 +0000 (21:53 -0800)
Declare the format-string argument to tok2strbuf(), tok2str(),
bittok2str(), and bittok2str_nosep() as such, to see whether that gets
MSVC not to complain - or if it just gets upset because there's no "..."
argument list for it.

netdissect.h

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