This is an automated email from the ASF dual-hosted git repository.

simbit18 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new 518e51e3696 net/can/can_callback.c: Fix the readahead warning format.
518e51e3696 is described below

commit 518e51e3696adeb415016ce40a86609f6e379b45
Author: raiden00pl <[email protected]>
AuthorDate: Sat Oct 10 18:02:32 2026 +0200

    net/can/can_callback.c: Fix the readahead warning format.
    
    can_datahandler() printed the int buffer count with PRId32 and the
    unsigned int from iob_get_queue_entry_count() with PRIuPTR. On arm64
    PRIuPTR is "lu", so every build with CONFIG_NET_CAN and
    CONFIG_NET_RECV_BUFSIZE > 0 failed with -Werror=format, even with
    network warnings disabled. Use %d and %u, which match the argument
    types.
    
    Assisted-by: Claude:claude-opus-5-5
    Signed-off-by: raiden00pl <[email protected]>
---
 net/can/can_callback.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/can/can_callback.c b/net/can/can_callback.c
index c5c072d143a..cf061b9aeb2 100644
--- a/net/can/can_callback.c
+++ b/net/can/can_callback.c
@@ -184,7 +184,7 @@ int can_datahandler(FAR struct net_driver_s *dev,
   if (iob_get_queue_entry_count(&conn->readahead) >= bufnum)
     {
       nwarn("WARNING: There are no free receive buffer to retain the data. "
-            "Receive buffer number:%"PRId32", received frames:%"PRIuPTR" \n",
+            "Receive buffer number:%d, received frames:%u \n",
             bufnum, iob_get_queue_entry_count(&conn->readahead));
       goto errout;
     }

Reply via email to