examples: use PRIu64 instead %lld when printing uint64_t values
authorLuka Perkov <luka@openwrt.org>
Thu, 3 Jul 2014 10:28:24 +0000 (12:28 +0200)
committerFelix Fietkau <nbd@openwrt.org>
Thu, 3 Jul 2014 10:53:13 +0000 (12:53 +0200)
Patch fixes build failure:

error: format ‘%lld’ expects argument of type ‘long long int’, but argument 3 has type ‘uint64_t’ [-Werror=format=]
   indent_printf(indent, "%lld\n", *(uint64_t *)data);

Signed-off-by: Luka Perkov <luka@openwrt.org>
examples/blobmsg-example.c

index 01c0915988a700c06d113dbcad4e5d6620d301aa..86501e2a3ba8e723aed711696e774ad2dd3b4dbb 100644 (file)
@@ -45,7 +45,7 @@ static void dump_attr_data(void *data, int len, int type, int indent, int next_i
                indent_printf(indent, "%d\n", *(uint32_t *)data);
                break;
        case BLOBMSG_TYPE_INT64:
-               indent_printf(indent, "%lld\n", *(uint64_t *)data);
+               indent_printf(indent, "%"PRIu64"\n", *(uint64_t *)data);
                break;
        case BLOBMSG_TYPE_TABLE:
        case BLOBMSG_TYPE_ARRAY: