[libcamera-devel] v4l2: camera_proxy: Include <array>

Message ID 20200107223040.12294-1-laurent.pinchart@ideasonboard.com
State Accepted
Commit eccbb175516670f13c6a4f8f9e4ed8bc1228938c
Headers show
Series
  • [libcamera-devel] v4l2: camera_proxy: Include <array>
Related show

Commit Message

Laurent Pinchart Jan. 7, 2020, 10:30 p.m. UTC
Commit 29c5508075c1 ("v4l2: camera_proxy: Create format info array")
introduced usage of the std::array template class, but didn't include
the corresponding header. This may cause a compilation breakage in the
future if the indirect include of <array> disappears due to unrelated
changes. Fix it.

Fixed: 29c5508075c1 ("v4l2: camera_proxy: Create format info array")
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
 src/v4l2/v4l2_camera_proxy.cpp | 1 +
 1 file changed, 1 insertion(+)

Comments

Niklas Söderlund Jan. 8, 2020, 12:16 a.m. UTC | #1
Hi Laurent,

Thanks for your work.

On 2020-01-08 00:30:40 +0200, Laurent Pinchart wrote:
> Commit 29c5508075c1 ("v4l2: camera_proxy: Create format info array")
> introduced usage of the std::array template class, but didn't include
> the corresponding header. This may cause a compilation breakage in the
> future if the indirect include of <array> disappears due to unrelated
> changes. Fix it.
> 
> Fixed: 29c5508075c1 ("v4l2: camera_proxy: Create format info array")
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>

> ---
>  src/v4l2/v4l2_camera_proxy.cpp | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/src/v4l2/v4l2_camera_proxy.cpp b/src/v4l2/v4l2_camera_proxy.cpp
> index bdd4a6c3475d..8d1b40da7367 100644
> --- a/src/v4l2/v4l2_camera_proxy.cpp
> +++ b/src/v4l2/v4l2_camera_proxy.cpp
> @@ -8,6 +8,7 @@
>  #include "v4l2_camera_proxy.h"
>  
>  #include <algorithm>
> +#include <array>
>  #include <errno.h>
>  #include <linux/drm_fourcc.h>
>  #include <linux/videodev2.h>
> -- 
> Regards,
> 
> Laurent Pinchart
> 
> _______________________________________________
> libcamera-devel mailing list
> libcamera-devel@lists.libcamera.org
> https://lists.libcamera.org/listinfo/libcamera-devel
Jacopo Mondi Jan. 8, 2020, 8:33 a.m. UTC | #2
Hi Laurent,

On Wed, Jan 08, 2020 at 12:30:40AM +0200, Laurent Pinchart wrote:
> Commit 29c5508075c1 ("v4l2: camera_proxy: Create format info array")
> introduced usage of the std::array template class, but didn't include
> the corresponding header. This may cause a compilation breakage in the
> future if the indirect include of <array> disappears due to unrelated
> changes. Fix it.
>
> Fixed: 29c5508075c1 ("v4l2: camera_proxy: Create format info array")
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

Sorry, missed it during review

Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Thanks
   j

> ---
>  src/v4l2/v4l2_camera_proxy.cpp | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/src/v4l2/v4l2_camera_proxy.cpp b/src/v4l2/v4l2_camera_proxy.cpp
> index bdd4a6c3475d..8d1b40da7367 100644
> --- a/src/v4l2/v4l2_camera_proxy.cpp
> +++ b/src/v4l2/v4l2_camera_proxy.cpp
> @@ -8,6 +8,7 @@
>  #include "v4l2_camera_proxy.h"
>
>  #include <algorithm>
> +#include <array>
>  #include <errno.h>
>  #include <linux/drm_fourcc.h>
>  #include <linux/videodev2.h>
> --
> Regards,
>
> Laurent Pinchart
>
> _______________________________________________
> libcamera-devel mailing list
> libcamera-devel@lists.libcamera.org
> https://lists.libcamera.org/listinfo/libcamera-devel

Patch

diff --git a/src/v4l2/v4l2_camera_proxy.cpp b/src/v4l2/v4l2_camera_proxy.cpp
index bdd4a6c3475d..8d1b40da7367 100644
--- a/src/v4l2/v4l2_camera_proxy.cpp
+++ b/src/v4l2/v4l2_camera_proxy.cpp
@@ -8,6 +8,7 @@ 
 #include "v4l2_camera_proxy.h"
 
 #include <algorithm>
+#include <array>
 #include <errno.h>
 #include <linux/drm_fourcc.h>
 #include <linux/videodev2.h>