From: Guy Harris Date: Sun, 7 Aug 2016 22:35:54 +0000 (-0700) Subject: Squelch a signed array subscript warning. X-Git-Tag: tcpdump-4.9.0-bp~209 X-Git-Url: https://git.tcpdump.org/tcpdump/commitdiff_plain/62d52f2ea854fc95503203940a735429d0e72223 Squelch a signed array subscript warning. As the string in question is passed as a constant from a printer, it *shouldn't* contain any non-ASCII characters, but squelching the warning is harmless and, on modern processors, a non-sign-extending byte load shouldn't be any worse than a sign-extending byte load. --- diff --git a/util-print.c b/util-print.c index 6858ce36..113f7846 100644 --- a/util-print.c +++ b/util-print.c @@ -783,7 +783,7 @@ txtproto_print(netdissect_options *ndo, const u_char *pptr, u_int len, /* Capitalize the protocol name */ for (pnp = protoname; *pnp != '\0'; pnp++) - ND_PRINT((ndo, "%c", toupper(*pnp))); + ND_PRINT((ndo, "%c", toupper((u_char)*pnp))); if (is_reqresp) { /*