From e62e1e91fe742f09751314da9a3b5e349a42ea75 Mon Sep 17 00:00:00 2001 From: "Daniel P. Carvalho" Date: Thu, 21 Sep 2023 12:10:15 -0300 Subject: [PATCH] Fixes compiler warnings while printing uint32_t and int32_t values. --- examples/ina226/ina226_main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/ina226/ina226_main.c b/examples/ina226/ina226_main.c index e760397b5..69d040cdf 100644 --- a/examples/ina226/ina226_main.c +++ b/examples/ina226/ina226_main.c @@ -24,6 +24,7 @@ #include #include +#include #include #include #include @@ -70,7 +71,8 @@ int main(int argc, FAR char *argv[]) break; } - printf("U=%12u uV I=%12d uA\n", sample.voltage, sample.current); + printf("U=%12"PRIu32 "uV I=%12"PRIi32 "uA\n", sample.voltage, + sample.current); usleep(500000); }