From: Guy Harris Date: Tue, 11 Dec 2018 06:01:39 +0000 (-0800) Subject: Revert "Try to squelch a warning about non-constant format strings." X-Git-Tag: tcpdump-4.99-bp~953 X-Git-Url: https://git.tcpdump.org/tcpdump/commitdiff_plain/877753b5c84dfb2236a9646713bb8072f03b3c0b Revert "Try to squelch a warning about non-constant format strings." 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. --- diff --git a/netdissect.h b/netdissect.h index 58e860ff..0bacbfc7 100644 --- a/netdissect.h +++ b/netdissect.h @@ -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);