diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-11-25 08:09:57 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-11-25 08:09:57 -0600 |
commit | 40205b8ce91e12a08e7148670ca09eef74265843 (patch) | |
tree | deb7fd27b0c5b7ca576887e23457469b138aa526 /apps/examples/can | |
parent | f2048d655094547f1a5c1c24768f085ccf9cbcdc (diff) | |
download | nuttx-40205b8ce91e12a08e7148670ca09eef74265843.tar.gz nuttx-40205b8ce91e12a08e7148670ca09eef74265843.tar.bz2 nuttx-40205b8ce91e12a08e7148670ca09eef74265843.zip |
Fixes for more complaints from cppcheck
Diffstat (limited to 'apps/examples/can')
-rw-r--r-- | apps/examples/can/can_main.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/apps/examples/can/can_main.c b/apps/examples/can/can_main.c index d74dd9495..9daafc56a 100644 --- a/apps/examples/can/can_main.c +++ b/apps/examples/can/can_main.c @@ -146,7 +146,8 @@ int can_main(int argc, char *argv[]) { nmsgs = strtol(argv[1], NULL, 10); } - printf("can_main: nmsgs: %d\n", nmsgs); + + printf("can_main: nmsgs: %ld\n", nmsgs); #elif defined(CONFIG_EXAMPLES_CAN_NMSGS) printf("can_main: nmsgs: %d\n", CONFIG_EXAMPLES_CAN_NMSGS); #endif @@ -228,7 +229,7 @@ int can_main(int argc, char *argv[]) #endif #ifdef CONFIG_EXAMPLES_CAN_WRITEONLY - printf(" ID: %4d DLC: %d\n", msgid, msgdlc); + printf(" ID: %4u DLC: %d\n", msgid, msgdlc); #endif /* Read the RX message */ @@ -245,7 +246,7 @@ int can_main(int argc, char *argv[]) #endif #ifndef CONFIG_EXAMPLES_CAN_READONLY - printf(" ID: %4d DLC: %d\n", rxmsg.cm_hdr.ch_id, rxmsg.cm_hdr.ch_dlc); + printf(" ID: %4u DLC: %u\n", rxmsg.cm_hdr.ch_id, rxmsg.cm_hdr.ch_dlc); #endif /* Verify that the received messages are the same */ @@ -275,7 +276,7 @@ int can_main(int argc, char *argv[]) /* Report success */ - printf(" ID: %4d DLC: %d -- OK\n", msgid, msgdlc); + printf(" ID: %4u DLC: %d -- OK\n", msgid, msgdlc); #endif /* Set up for the next pass */ |