[libcamera-devel,5/8] libcamera: v4l2_device: Buffer is not a struct

Message ID 20190426150155.18652-6-laurent.pinchart@ideasonboard.com
State Accepted
Commit 4088ae7a20034270b632a5a3b163490a9654ae1d
Headers show
Series
  • Fix clang compilation warnings and errors
Related show

Commit Message

Laurent Pinchart April 26, 2019, 3:01 p.m. UTC
Buffer is a class, not a struct. Fix a variable declaration accordingly.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
 src/libcamera/v4l2_device.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Kieran Bingham April 26, 2019, 4:24 p.m. UTC | #1
On 26/04/2019 17:01, Laurent Pinchart wrote:
> Buffer is a class, not a struct. Fix a variable declaration accordingly.
> 
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

I bet this one was my fault ...

Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>



> ---
>  src/libcamera/v4l2_device.cpp | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/libcamera/v4l2_device.cpp b/src/libcamera/v4l2_device.cpp
> index 8d8c7887bf71..cfdce4813da4 100644
> --- a/src/libcamera/v4l2_device.cpp
> +++ b/src/libcamera/v4l2_device.cpp
> @@ -622,7 +622,7 @@ int V4L2Device::exportBuffers(BufferPool *pool)
>  	for (i = 0; i < pool->count(); ++i) {
>  		struct v4l2_plane planes[VIDEO_MAX_PLANES] = {};
>  		struct v4l2_buffer buf = {};
> -		struct Buffer &buffer = pool->buffers()[i];
> +		Buffer &buffer = pool->buffers()[i];
>  
>  		buf.index = i;
>  		buf.type = bufferType_;
>

Patch

diff --git a/src/libcamera/v4l2_device.cpp b/src/libcamera/v4l2_device.cpp
index 8d8c7887bf71..cfdce4813da4 100644
--- a/src/libcamera/v4l2_device.cpp
+++ b/src/libcamera/v4l2_device.cpp
@@ -622,7 +622,7 @@  int V4L2Device::exportBuffers(BufferPool *pool)
 	for (i = 0; i < pool->count(); ++i) {
 		struct v4l2_plane planes[VIDEO_MAX_PLANES] = {};
 		struct v4l2_buffer buf = {};
-		struct Buffer &buffer = pool->buffers()[i];
+		Buffer &buffer = pool->buffers()[i];
 
 		buf.index = i;
 		buf.type = bufferType_;