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 2021/07/04 04:21:20 UTC
[incubator-nuttx-apps] 01/03: examples/bmi160: Fix printf format
warning
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-apps.git
commit 814f10544e0919c3ef8971d2744e5ec37b8bfeab
Author: SPRESENSE <41...@users.noreply.github.com>
AuthorDate: Sun Jul 4 09:05:42 2021 +0900
examples/bmi160: Fix printf format warning
Fix printf format warning by -Wformat.
---
examples/bmi160/sixaxis_main.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/examples/bmi160/sixaxis_main.c b/examples/bmi160/sixaxis_main.c
index d798ab7..195ad81 100644
--- a/examples/bmi160/sixaxis_main.c
+++ b/examples/bmi160/sixaxis_main.c
@@ -38,6 +38,7 @@
****************************************************************************/
#include <nuttx/config.h>
+#include <inttypes.h>
#include <fcntl.h>
#include <stdio.h>
@@ -86,7 +87,7 @@ int main(int argc, FAR char *argv[])
if (prev != data.sensor_time)
{
- printf("[%d] %d, %d, %d / %d, %d, %d\n",
+ printf("[%" PRIu32 "] %d, %d, %d / %d, %d, %d\n",
data.sensor_time,
data.gyro.x, data.gyro.y, data.gyro.z,
data.accel.x, data.accel.y, data.accel.z);