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 2023/08/11 05:50:33 UTC
[nuttx-apps] branch master updated: nxcamera: Solve compilation errors caused by type mismatch
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/nuttx-apps.git
The following commit(s) were added to refs/heads/master by this push:
new 78792120c nxcamera: Solve compilation errors caused by type mismatch
78792120c is described below
commit 78792120cd815c12be6e3ff137d656091dc505af
Author: yangsen5 <ya...@xiaomi.com>
AuthorDate: Thu Jun 29 11:19:43 2023 +0800
nxcamera: Solve compilation errors caused by type mismatch
CC: nxcamera.c nxcamera.c: In function 'show_image':
nxcamera.c:85:20: error: initialization of 'uint32_t *' {aka 'unsigned int *'} from incompatible pointer type 'uint8_t *' {aka 'unsigned char *'} [-Werror=incompatible-pointer-types]
85 | uint32_t *pbuf = pcam->bufs[buf->index];
| ^~~~
cc1: all warnings being treated as errors
Signed-off-by: yangsen5 <ya...@xiaomi.com>
---
system/nxcamera/nxcamera.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/system/nxcamera/nxcamera.c b/system/nxcamera/nxcamera.c
index 3aa3f7d26..006a899be 100644
--- a/system/nxcamera/nxcamera.c
+++ b/system/nxcamera/nxcamera.c
@@ -161,7 +161,7 @@ err:
return 0;
#else
- uint32_t *pbuf = pcam->bufs[buf->index];
+ FAR uint32_t *pbuf = (FAR uint32_t *)pcam->bufs[buf->index];
vinfo("show image from %p: %" PRIx32 " %" PRIx32, pbuf, pbuf[0], pbuf[1]);
return 0;
#endif