]> The Tcpdump Group git mirrors - tcpdump/commitdiff
netdissect.h: Add a comment on IS_NOT_NEGATIVE macro
authorFrancois-Xavier Le Bail <[email protected]>
Tue, 28 Apr 2015 04:17:16 +0000 (06:17 +0200)
committerFrancois-Xavier Le Bail <[email protected]>
Tue, 28 Apr 2015 04:17:16 +0000 (06:17 +0200)
netdissect.h

index 9e369a994381fb332930eb9246d6b67139da4688..0bf80c16a7fc8874d7ed1e3e29489c54f91edd7a 100644 (file)
@@ -271,6 +271,11 @@ struct netdissect_options {
  *     http://www.kb.cert.org/vuls/id/162289
  */
 
+/*
+ * Test in two parts to avoid these warnings:
+ * comparison of unsigned expression >= 0 is always true [-Wtype-limits],
+ * comparison is always true due to limited range of data type [-Wtype-limits].
+ */
 #define IS_NOT_NEGATIVE(x) (((x) > 0) || ((x) == 0))
 
 #define ND_TTEST2(var, l) \