Fixes compiler warnings while printing uint32_t and int32_t values.

This commit is contained in:
Daniel P. Carvalho 2023-09-21 12:10:15 -03:00 committed by Xiang Xiao
parent 60778f6f8c
commit e62e1e91fe

View File

@ -24,6 +24,7 @@
#include <errno.h>
#include <fcntl.h>
#include <inttypes.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
@ -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);
}