From: Daniel Golle Date: Mon, 31 Aug 2020 09:55:09 +0000 (+0100) Subject: libopkg: fix compiler warning X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=cf44c2feb606b60ba3f35392e102c281ef6ea0da;p=project%2Fopkg-lede.git 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 --- 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));