From d2fd626780726c42a083567d6b3d74f56ef294cc Mon Sep 17 00:00:00 2001 From: yangsen5 Date: Wed, 6 Sep 2023 19:10:41 +0800 Subject: [PATCH] nxcamera: Fix compilation warnings caused by format issues nxcamera_main.c:160:26: warning: format '%d' expects argument of type 'int *', but argument 5 has type 'uint32_t *' {aka 'long unsigned int *'} [-Wformat=] 160 | sscanf(parg, "%hd %hd %d %4s", &width, &height, &framerate, cc); | ~^ ~~~~~~~~~~ | | | | int * uint32_t * {aka long unsigned int *} | %ld Signed-off-by: yangsen5 --- system/nxcamera/nxcamera_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/system/nxcamera/nxcamera_main.c b/system/nxcamera/nxcamera_main.c index 17c235d1c..5ca84da11 100644 --- a/system/nxcamera/nxcamera_main.c +++ b/system/nxcamera/nxcamera_main.c @@ -157,7 +157,8 @@ static int nxcamera_cmd_stream(FAR struct nxcamera_s *pcam, FAR char *parg) 0 }; - sscanf(parg, "%hd %hd %d %4s", &width, &height, &framerate, cc); + sscanf(parg, "%"SCNu16" %"SCNu16" %"SCNu32" %4s", + &width, &height, &framerate, cc); format = v4l2_fourcc(cc[0], cc[1], cc[2], cc[3]); /* Try to stream raw data with settings specified */