diff options
author | Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> | 2021-07-11 16:45:36 +0200 |
---|---|---|
committer | Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> | 2021-07-19 12:44:07 +0200 |
commit | da5f7e53b3653f1e1f46401922713a5660b65dc1 (patch) | |
tree | 0ef8bf204b6172e20718de2083cb689fb407ea64 | |
parent | 32a390663c25400eaa3001c3c2354520e7b7416d (diff) | |
download | neard-da5f7e53b3653f1e1f46401922713a5660b65dc1.tar.gz |
npp: use proper format for integers (-Wformat)
Properly print signed and unsigned integers. This fixes warnings like:
In file included from plugins/npp.c:36:
plugins/npp.c: In function ‘npp_push’:
./include/near/log.h:45:14: error: format ‘%zd’ expects argument of type ‘signed size_t’, but argument 4 has type ‘size_t’ {aka ‘long unsigned int’} [-Werror=format=]
45 | near_debug("%s:%s() " fmt, \
| ^~~~~~~~~~
plugins/npp.c:185:2: note: in expansion of macro ‘DBG’
185 | DBG("Sending %zd bytes", frame_length);
| ^~~
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
-rw-r--r-- | plugins/npp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/npp.c b/plugins/npp.c index 6bed302..5c9d2e0 100644 --- a/plugins/npp.c +++ b/plugins/npp.c @@ -182,7 +182,7 @@ static int npp_push(int fd, uint32_t adapter_idx, uint32_t target_idx, entry->ndef_length = GINT_TO_BE(ndef->length); memcpy(entry->ndef, ndef->data, ndef->length); - DBG("Sending %zd bytes", frame_length); + DBG("Sending %zu bytes", frame_length); err = send(fd, frame, frame_length, MSG_DONTWAIT); |