From a0bb6541c29653988311d870f7a08a87b3d696b7 Mon Sep 17 00:00:00 2001 From: yangsen5 Date: Thu, 29 Jun 2023 11:19:43 +0800 Subject: [PATCH] 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 --- 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 aa419f318e..10fdde00c0 100644 --- a/system/nxcamera/nxcamera.c +++ b/system/nxcamera/nxcamera.c @@ -82,7 +82,7 @@ static int show_image(FAR struct nxcamera_s *pcam, FAR v4l2_buffer_t *buf) 0, pcam->fmt.fmt.pix.pixelformat); #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