From cf44c2feb606b60ba3f35392e102c281ef6ea0da Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Mon, 31 Aug 2020 10:55:09 +0100 Subject: [PATCH] libopkg: fix compiler warning libopkg/pkg.c: In function 'pkg_set_raw': libopkg/pkg.c:109:58: warning: format '%d' expects argument of type 'int', but argument 5 has type 'size_t' {aka 'long unsigned int'} [-Wformat=] Use '%zu' instead. Signed-off-by: Daniel Golle --- libopkg/pkg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libopkg/pkg.c b/libopkg/pkg.c index e5bfe6f..f68ce0c 100644 --- a/libopkg/pkg.c +++ b/libopkg/pkg.c @@ -106,7 +106,7 @@ void *pkg_set_raw(pkg_t *pkg, int id, const void *val, size_t len) blob_for_each_attr(cur, pkg->blob.head, rem) { if (blob_id(cur) == id) { if (blob_len(cur) < len) { - fprintf(stderr, "ERROR: truncating field %d <%p> to %d byte", + fprintf(stderr, "ERROR: truncating field %d <%p> to %zu byte", id, val, blob_len(cur)); } memcpy(blob_data(cur), val, blob_len(cur)); -- 2.30.2