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:21 UTC
[incubator-nuttx-apps] 02/03: examples/charger: Fix some printf
format warnings
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 4afa1f1514ca8be0377053662c14ad96db526b43
Author: SPRESENSE <41...@users.noreply.github.com>
AuthorDate: Sun Jul 4 09:06:57 2021 +0900
examples/charger: Fix some printf format warnings
Fix some printf format warnings by -Wformat.
---
examples/charger/charger_main.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/examples/charger/charger_main.c b/examples/charger/charger_main.c
index 038a674..ef91abc 100644
--- a/examples/charger/charger_main.c
+++ b/examples/charger/charger_main.c
@@ -244,8 +244,8 @@ int main(int argc, FAR char *argv[])
}
gettimeofday(&tv, NULL);
- printf("%d.%06d: %d mV, %d mA\n",
- tv.tv_sec, tv.tv_usec, voltage, current);
+ printf("%ju.%06ld: %d mV, %d mA\n",
+ (uintmax_t)tv.tv_sec, tv.tv_usec, voltage, current);
close(fd);