diff options
author | Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> | 2021-07-11 16:38:55 +0200 |
---|---|---|
committer | Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> | 2021-07-19 12:44:07 +0200 |
commit | bac5291e6c102a77a22928b4ee067388ee3a562f (patch) | |
tree | e4aaba2cbd967c24e3d4f49ae28ac29f7143e0b8 | |
parent | f941cdc4597d1b127546be00a1fcb4dcc7c85063 (diff) | |
download | neard-bac5291e6c102a77a22928b4ee067388ee3a562f.tar.gz |
nfctype3: use proper format for integers (-Wformat)
Properly print signed and unsigned integers. This fixes warnings like:
In file included from plugins/nfctype3.c:36:
plugins/nfctype3.c: In function ‘data_recv’:
./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/nfctype3.c:249:3: note: in expansion of macro ‘DBG’
249 | DBG("Done reading %zd bytes at %p", data_length, nfc_data);
| ^~~
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
-rw-r--r-- | plugins/nfctype3.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/nfctype3.c b/plugins/nfctype3.c index d4fbed0..c0502f1 100644 --- a/plugins/nfctype3.c +++ b/plugins/nfctype3.c @@ -246,7 +246,7 @@ static int data_recv(uint8_t *resp, int length, void *data) tag->current_block = 0; - DBG("Done reading %zd bytes at %p", data_length, nfc_data); + DBG("Done reading %zu bytes at %p", data_length, nfc_data); records = near_ndef_parse_msg(nfc_data, data_length, NULL); near_tag_add_records(tag->tag, records, tag->cb, 0); |