Skip to content

Commit b11f79c

Browse files
authored
Merge pull request json-c#741 from rouault/json_type_to_name_formatter
json_type_to_name(): use correct printf() formatter
2 parents 78246db + f2c0df4 commit b11f79c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

json_util.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -288,8 +288,8 @@ const char *json_type_to_name(enum json_type o_type)
288288
int o_type_int = (int)o_type;
289289
if (o_type_int < 0 || o_type_int >= (int)NELEM(json_type_name))
290290
{
291-
_json_c_set_last_err("json_type_to_name: type %d is out of range [0,%d]\n", o_type,
292-
NELEM(json_type_name));
291+
_json_c_set_last_err("json_type_to_name: type %d is out of range [0,%u]\n", o_type,
292+
(unsigned)NELEM(json_type_name));
293293
return NULL;
294294
}
295295
return json_type_name[o_type];

0 commit comments

Comments
 (0)