json-c/json-c — pull request #34 by bentley (2012-06-21 06:15:39+00:00)
Title: Fix test warning: strlen() returns size_t, not int.

Prevents a test failure on OpenBSD:
cc -DHAVE_CONFIG_H -I. -I.. -Wall -Wwrite-strings -Werror -std=gnu99 -D_GNU_SOURCE -D_REENTRANT -O2 -pipe -MT test_printbuf.o -MD -MP -MF .deps/test_printbuf.Tpo -c -o test_printbuf.o test_printbuf.c
cc1: warnings being treated as errors
test_printbuf.c: In function 'test_sprintbuf':
test_printbuf.c:127: warning: format '%d' expects type 'int', but argument 5 has type 'size_t'
*** Error code 1

From the strlen(3) man page:

size_t
strlen(const char *s);

From the printf(3) man page:

"The z modifier, when applied to a d or i conversion, indicates that the
argument is of a signed type equivalent in size to a size_t."