You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by ac...@apache.org on 2021/11/18 12:58:58 UTC
[incubator-nuttx] branch master updated: sensors/wtgahrs2: Fix syslog format warning
This is an automated email from the ASF dual-hosted git repository.
acassis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new 8e42f36 sensors/wtgahrs2: Fix syslog format warning
8e42f36 is described below
commit 8e42f368ee071e89096f56711afb49d4cddcbdbe
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Wed Nov 17 23:48:14 2021 +0800
sensors/wtgahrs2: Fix syslog format warning
sensors/wtgahrs2.c: In function 'wtgahrs2_gps_data':
Error: sensors/wtgahrs2.c:332:14: error: format '%llu' expects argument of type 'long long unsigned int', but argument 3 has type 'uint64_t' {aka 'long unsigned int'} [-Werror=format=]
332 | sninfo("Time : %llu utc_time: %llu\n",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
333 | rtdata->gps.timestamp, rtdata->gps.time_utc);
| ~~~~~~~~~~~~~~~~~~~~~
| |
| uint64_t {aka long unsigned int}
sensors/wtgahrs2.c:332:25: note: format string is defined here
332 | sninfo("Time : %llu utc_time: %llu\n",
| ~~~^
| |
| long long unsigned int
| %lu
In file included from sensors/wtgahrs2.c:37:
Error: sensors/wtgahrs2.c:332:14: error: format '%llu' expects argument of type 'long long unsigned int', but argument 4 has type 'uint64_t' {aka 'long unsigned int'} [-Werror=format=]
332 | sninfo("Time : %llu utc_time: %llu\n",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
333 | rtdata->gps.timestamp, rtdata->gps.time_utc);
| ~~~~~~~~~~~~~~~~~~~~
| |
| uint64_t {aka long unsigned int}
sensors/wtgahrs2.c:332:40: note: format string is defined here
332 | sninfo("Time : %llu utc_time: %llu\n",
| ~~~^
| |
| long long unsigned int
| %lu
Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
drivers/sensors/wtgahrs2.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/sensors/wtgahrs2.c b/drivers/sensors/wtgahrs2.c
index 8d726ef..81ea70f 100644
--- a/drivers/sensors/wtgahrs2.c
+++ b/drivers/sensors/wtgahrs2.c
@@ -329,7 +329,7 @@ static void wtgahrs2_gps_data(FAR struct wtgahrs2_dev_s *rtdata,
{
rtdata->gps_mask = 0;
lower->push_event(lower->priv, &rtdata->gps, sizeof(rtdata->gps));
- sninfo("Time : %llu utc_time: %llu\n",
+ sninfo("Time : %" PRIu64 " utc_time: %" PRIu64 "\n",
rtdata->gps.timestamp, rtdata->gps.time_utc);
sninfo("GPS longitude : %fdegree, latitude:%fdegree\n",
rtdata->gps.longitude, rtdata->gps.latitude);