tcpdump mailing list archives
ND_PRINT() parenthesis errors
From: "Gisle Vanem" <gvanem () yahoo no>
Date: Tue, 15 Apr 2014 14:37:42 +0200
Here are some errors in lost parenthesis errors I've found when building using MSVC: diff -Hb -u3 Git-Latest/print-802_15_4.c ./print-802_15_4.c --- Git-Latest/print-802_15_4.c 2014-04-10 23:49:50 +0000 +++ ./print-802_15_4.c 2014-04-15 13:22:13 +0000 @@ -143,7 +143,7 @@ p += 8; break; } - ND_PRINT((ndo,"< "); + ND_PRINT((ndo,"< ")); switch ((fc >> 14) & 0x3) { case 0x00: @@ -165,7 +165,7 @@ panid = EXTRACT_LE_16BITS(p); p += 2; } - ND_PRINT((ndo,"%04x:%s ", panid, le64addr_string(p)))); + ND_PRINT((ndo,"%04x:%s ", panid, le64addr_string(p))); p += 8; break; } diff -Hb -u3 Git-Latest/print-tcp.c ./print-tcp.c --- Git-Latest/print-tcp.c 2014-04-10 23:49:50 +0000 +++ ./print-tcp.c 2014-04-15 13:24:31 +0000 @@ -810,8 +810,8 @@ tp1 = *tp; if (ndo->ndo_sigsecret == NULL) { - ND_PRINT((ndo, "shared secret not supplied with -M, "); - return (CANT_CHECK_SIGNATURE)); + ND_PRINT((ndo, "shared secret not supplied with -M, ")); + return (CANT_CHECK_SIGNATURE); } MD5_Init(&ctx); --------Building with MingW/gcc 4.7.2 these errors went unnoticed :-( I assume the 'gcc -E ' stage is more liberal, but the preprocessor output is crap in this case. The:
ND_PRINT((ndo,"< "); switch ((fc >> 14) & 0x3) { ... showed a big blob of output on a single line. --gv _______________________________________________ tcpdump-workers mailing list tcpdump-workers () lists tcpdump org https://lists.sandelman.ca/mailman/listinfo/tcpdump-workers
Current thread:
- ND_PRINT() parenthesis errors Gisle Vanem (Apr 15)
- Re: ND_PRINT() parenthesis errors Guy Harris (Apr 15)