diff options
author | Even Rouault <even.rouault@spatialys.com> | 2022-01-16 20:48:27 +0100 |
---|---|---|
committer | Even Rouault <even.rouault@spatialys.com> | 2022-01-31 00:27:41 +0100 |
commit | f2c0df404bf72e4e0f0de65dd96266af2b1d8cbd (patch) | |
tree | 05c9f273c9ccd549d0e770d5b68318c2416d4953 | |
parent | 3b4f1e92ad19f0fae5a6c54a904f97225c70cacf (diff) | |
download | json-c-f2c0df404bf72e4e0f0de65dd96266af2b1d8cbd.tar.gz |
json_type_to_name(): use correct printf() formatter
Was detected by Coverity Scan when analyzing GDAL's code base which has
a copy of json-c
-rw-r--r-- | json_util.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/json_util.c b/json_util.c index 4312458..a65adc0 100644 --- a/json_util.c +++ b/json_util.c @@ -288,8 +288,8 @@ const char *json_type_to_name(enum json_type o_type) int o_type_int = (int)o_type; if (o_type_int < 0 || o_type_int >= (int)NELEM(json_type_name)) { - _json_c_set_last_err("json_type_to_name: type %d is out of range [0,%d]\n", o_type, - NELEM(json_type_name)); + _json_c_set_last_err("json_type_to_name: type %d is out of range [0,%u]\n", o_type, + (unsigned)NELEM(json_type_name)); return NULL; } return json_type_name[o_type]; |