You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2020/11/25 13:11:47 UTC
[incubator-nuttx] 10/35: drivers/can/can.c: Fix a syslog format
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit 75484f95b8534bf37a588b57fd77310d056b3e70
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Wed Nov 25 16:49:31 2020 +0900
drivers/can/can.c: Fix a syslog format
---
drivers/can/can.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/can/can.c b/drivers/can/can.c
index 5f87408..a0d6d3a 100644
--- a/drivers/can/can.c
+++ b/drivers/can/can.c
@@ -44,6 +44,7 @@
#include <nuttx/config.h>
#include <sys/types.h>
+#include <inttypes.h>
#include <stdint.h>
#include <stdbool.h>
#include <unistd.h>
@@ -1237,7 +1238,7 @@ int can_receive(FAR struct can_dev_s *dev, FAR struct can_hdr_s *hdr,
int errcode = -ENOMEM;
int i;
- caninfo("ID: %d DLC: %d\n", hdr->ch_id, hdr->ch_dlc);
+ caninfo("ID: %" PRId32 " DLC: %d\n", (uint32_t)hdr->ch_id, hdr->ch_dlc);
/* Check if adding this new message would over-run the drivers ability to
* enqueue read data.