[linux-nfc] [neard][PATCH 24/34] npp: use proper format for integers (-Wformat)

Krzysztof Kozlowski <[email protected]>
Newsgroups org.01.lists.linux-nfc,dev.linux.lists.oe-linux-nfc
Message-ID <[email protected]>
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 <[email protected]>
---
 plugins/npp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/plugins/npp.c b/plugins/npp.c
index 6bed302b4a8f..5c9d2e0cd003 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);
 
-- 
2.27.0
_______________________________________________
Linux-nfc mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.