]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Fix some MSVC 14.0 warnings
authorFrancois-Xavier Le Bail <[email protected]>
Wed, 7 Feb 2024 09:05:26 +0000 (10:05 +0100)
committerFrancois-Xavier Le Bail <[email protected]>
Wed, 7 Feb 2024 09:06:44 +0000 (10:06 +0100)
The warnings were:
util-print.c(518): warning C4028: formal parameter 3 different from
  declaration
util-print.c(579): warning C4028: formal parameter 3 different from
  declaration
util-print.c(589): warning C4028: formal parameter 3 different from
  declaration
util-print.c(601): warning C4028: formal parameter 4 different from
  declaration
util-print.c(634): warning C4028: formal parameter 1 different from
  declaration

It is a follow-up to 857656d29151f99a1c5de50a0c7574c3cf786241.

netdissect.h

index 2a371d8721d36a74de3239004748ef70f135ce1f..f8cc9961bc80bcdbe9582671019446dd5b3e11d4 100644 (file)
@@ -153,9 +153,9 @@ struct tok {
 };
 
 /* 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 *, const char *, const u_int);
+extern char *bittok2str(const struct tok *, const char *, const u_int);
+extern char *bittok2str_nosep(const struct tok *, const char *, const u_int);
 
 /* Initialize netdissect. */
 extern int nd_init(char *, size_t);
@@ -501,7 +501,7 @@ extern int unaligned_memcmp(const void *, const void *, size_t);
 #define PLURAL_SUFFIX(n) \
        (((n) != 1) ? "s" : "")
 
-extern const char *tok2strary_internal(const char **, int, const char *, int);
+extern const char *tok2strary_internal(const char **, int, const char *, const int);
 #define        tok2strary(a,f,i) tok2strary_internal(a, sizeof(a)/sizeof(a[0]),f,i)
 
 struct uint_tokary
@@ -794,7 +794,7 @@ extern void nd_print_protocol(netdissect_options *);
 extern void nd_print_protocol_caps(netdissect_options *);
 extern void nd_print_invalid(netdissect_options *);
 
-extern int mask2plen(uint32_t);
+extern int mask2plen(const uint32_t);
 extern int mask62plen(const u_char *);
 
 extern const char *dnnum_string(netdissect_options *, u_short);