nfctype2: use proper format for integers (-Wformat)
Properly print signed and unsigned integers. This fixes warnings like:
In file included from plugins/nfctype2.c:36:
plugins/nfctype2.c: In function ‘data_recv’:
./include/near/log.h:45:14: error: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘uint32_t’ {aka ‘unsigned int’} [-Werror=format=]
45 | near_debug("%s:%s() " fmt, \
| ^~~~~~~~~~
plugins/nfctype2.c:195:2: note: in expansion of macro ‘DBG’
195 | DBG("adapter %d", adapter_idx);
| ^~~
plugins/nfctype2.c: In function ‘nfctype2_write’:
plugins/nfctype2.c:458:43: error: format ‘%zd’ expects argument of type ‘signed size_t’, but argument 2 has type ‘size_t’ {aka ‘long unsigned int’} [-Werror=format=]
458 | near_error("Not enough space on tag %zd %zd",
| ~~^
| |
| long int
| %ld
459 | ndef->length,
| ~~~~~~~~~~~~
| |
| size_t {aka long unsigned int}
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
1 file changed