]> The Tcpdump Group git mirrors - libpcap/commitdiff
Squelch some warnings.
authorGuy Harris <[email protected]>
Tue, 20 Mar 2018 20:28:07 +0000 (13:28 -0700)
committerGuy Harris <[email protected]>
Tue, 20 Mar 2018 20:28:07 +0000 (13:28 -0700)
All the Q_ values fit in an unsigend char, so just cast the qualifier
arguments to QSET() to unsigned char.

grammar.y

index cbd88cda16e4ec841ebf6be9269772a07afa47ae..9af9ac86e9b0555ce351eebfb4b2efbffc343e78 100644 (file)
--- a/grammar.y
+++ b/grammar.y
@@ -90,9 +90,9 @@ DIAG_ON_BYACC
 #include "os-proto.h"
 #endif
 
-#define QSET(q, p, d, a) (q).proto = (p),\
-                        (q).dir = (d),\
-                        (q).addr = (a)
+#define QSET(q, p, d, a) (q).proto = (unsigned char)(p),\
+                        (q).dir = (unsigned char)(d),\
+                        (q).addr = (unsigned char)(a)
 
 struct tok {
        int v;                  /* value */