]> git.ipfire.org Git - thirdparty/json-c.git/commit
tests/tests1: fix printf format for size_t arguments 232/head
authorMatthias Schiffer <mschiffer@universe-factory.net>
Tue, 7 Jun 2016 08:49:42 +0000 (10:49 +0200)
committerMatthias Schiffer <mschiffer@universe-factory.net>
Tue, 7 Jun 2016 08:49:42 +0000 (10:49 +0200)
commitd13cfe10f61549b7869d09d6fd7371527b9aac90
tree0cb3edc2e484e54e5c10cda0bf4276a514669e87
parenta42caac8055d14c1b4e7022df170a849a7fd79b3
tests/tests1: fix printf format for size_t arguments

Change %d to %llu and add cast to unsigned long long for size_t arguments,
otherwise compilation will fail with errors like:

test1.c:70:15: error: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘size_t {aka long unsigned int}’ [-Werror=format=]

%zu is avoided to stay compatible with old libc versions (like old Visual
Studio).
tests/test1.c