From: Jeff Lucovsky Date: Fri, 10 Jul 2020 12:42:37 +0000 (-0400) Subject: output/json: Correct clang warning X-Git-Tag: suricata-6.0.0-beta1~223 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6bb89c37f17458d1310f9d8ebb9ff05ba6123102;p=thirdparty%2Fsuricata.git output/json: Correct clang warning This commit corrects the warning for mismatched type. --- diff --git a/src/output-json.c b/src/output-json.c index 320d12ec50..d89d6b16a5 100644 --- a/src/output-json.c +++ b/src/output-json.c @@ -1029,7 +1029,7 @@ void JsonFiveTuple(const Packet *p, enum OutputJsonLogDirection dir, json_t *js) json_object_set_new(js, "proto", json_string(known_proto[IP_GET_IPPROTO(p)])); } else { char proto[4]; - snprintf(proto, sizeof(proto), "%"PRIu8"", IP_GET_IPPROTO(p)); + snprintf(proto, sizeof(proto), "%"PRIu32"", IP_GET_IPPROTO(p)); json_object_set_new(js, "proto", json_string(proto)); } }