mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-08-20 04:58:29 +00:00
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 <yangsen5@xiaomi.com>
This commit is contained in:
parent
791d1fc08d
commit
d2fd626780
1 changed files with 2 additions and 1 deletions
|
|
@ -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 */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue