From: Ben Pfaff Date: Sun, 7 Feb 2021 04:13:50 +0000 (-0800) Subject: spv-light-decoder: Use unsigned int, not int, for %x with sscanf(). X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dd45af75d87c680c7de07d591095751a0d75e49a;p=pspp spv-light-decoder: Use unsigned int, not int, for %x with sscanf(). Found by cppcheck. Reported by John Darrington. --- diff --git a/src/output/spv/spv-light-decoder.c b/src/output/spv/spv-light-decoder.c index 58b5ddbe02..fb0dd18d6a 100644 --- a/src/output/spv/spv-light-decoder.c +++ b/src/output/spv/spv-light-decoder.c @@ -96,7 +96,7 @@ static char * WARN_UNUSED_RESULT decode_spvlb_color_string (const char *s, uint8_t def, struct cell_color *colorp) { - int r, g, b; + unsigned int r, g, b; if (!*s) r = g = b = def; else if (sscanf (s, "#%2x%2x%2x", &r, &g, &b) != 3)