aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKelvin Lee <kiyolee@gmail.com>2020-11-06 15:51:14 +1100
committerKelvin Lee <kiyolee@gmail.com>2020-11-06 15:51:14 +1100
commit638449c43dfdc0a37ef999dd349988cf294525e6 (patch)
treef0cce1521f0dcdbb5e43e235307f180b7e02abbd
parent38c4b80ab70aaa9fbc3d728959083ddff9132b6e (diff)
downloadjansson-638449c43dfdc0a37ef999dd349988cf294525e6.zip
jansson-638449c43dfdc0a37ef999dd349988cf294525e6.tar.gz
jansson-638449c43dfdc0a37ef999dd349988cf294525e6.tar.bz2
C11 %zd is bit overkill here. Especially requiring conditional compile.
-rw-r--r--examples/simple_parse.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/examples/simple_parse.c b/examples/simple_parse.c
index 728416d..a96a0f8 100644
--- a/examples/simple_parse.c
+++ b/examples/simple_parse.c
@@ -90,11 +90,7 @@ void print_json_object(json_t *element, int indent) {
print_json_indent(indent);
size = json_object_size(element);
-#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L
- printf("JSON Object of %zd pair%s:\n", size, json_plural(size));
-#else
printf("JSON Object of %lld pair%s:\n", (long long)size, json_plural(size));
-#endif
json_object_foreach(element, key, value) {
print_json_indent(indent + 2);
printf("JSON Key: \"%s\"\n", key);
@@ -107,11 +103,7 @@ void print_json_array(json_t *element, int indent) {
size_t size = json_array_size(element);
print_json_indent(indent);
-#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L
- printf("JSON Array of %zd element%s:\n", size, json_plural(size));
-#else
printf("JSON Array of %lld element%s:\n", (long long)size, json_plural(size));
-#endif
for (i = 0; i < size; i++) {
print_json_aux(json_array_get(element, i), indent + 2);
}