diff options
Diffstat (limited to 'recipes-core/libxcam/libxcam')
-rw-r--r-- | recipes-core/libxcam/libxcam/0001-fake_v4l2_device.h-fix-narrowing-warning.patch | 94 | ||||
-rw-r--r-- | recipes-core/libxcam/libxcam/0001-test-soft-image.cpp-fix-header-path.patch | 37 |
2 files changed, 94 insertions, 37 deletions
diff --git a/recipes-core/libxcam/libxcam/0001-fake_v4l2_device.h-fix-narrowing-warning.patch b/recipes-core/libxcam/libxcam/0001-fake_v4l2_device.h-fix-narrowing-warning.patch new file mode 100644 index 00000000..f15d5cc7 --- /dev/null +++ b/recipes-core/libxcam/libxcam/0001-fake_v4l2_device.h-fix-narrowing-warning.patch | |||
@@ -0,0 +1,94 @@ | |||
1 | From d4c97b50b577ea16b9ff6d9a352ab474a119310e Mon Sep 17 00:00:00 2001 | ||
2 | From: Naveen Saini <naveen.kumar.saini@intel.com> | ||
3 | Date: Wed, 18 May 2022 15:41:24 +0800 | ||
4 | Subject: [PATCH] fake_v4l2_device.h: fix narrowing warning | ||
5 | |||
6 | Use uint32_t instead of int for IOCTLs commands. | ||
7 | |||
8 | Warning log: | ||
9 | | ../../../git/xcore/fake_v4l2_device.h: In member function 'virtual int XCam::FakeV4l2Device::io_control(int, void*)': | ||
10 | | ../../../git/xcore/fake_v4l2_device.h:42:14: error: narrowing conversion of '3225441794' from 'long unsigned int' to 'int' [-Wnarrowing] | ||
11 | | 42 | case VIDIOC_ENUM_FMT: | ||
12 | | | ^~~~~~~~~~~~~~~ | ||
13 | | make[4]: *** [Makefile:685: libgstxcamsrc_la-gstxcamsrc.lo] Error 1 | ||
14 | |||
15 | Issue: https://github.com/intel/libxcam/issues/801 | ||
16 | Upstream-Status: Submitted [https://github.com/intel/libxcam/pull/802] | ||
17 | |||
18 | Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com> | ||
19 | --- | ||
20 | xcore/base/xcam_common.h | 2 +- | ||
21 | xcore/fake_v4l2_device.h | 2 +- | ||
22 | xcore/v4l2_device.cpp | 2 +- | ||
23 | xcore/v4l2_device.h | 2 +- | ||
24 | xcore/xcam_common.cpp | 2 +- | ||
25 | 5 files changed, 5 insertions(+), 5 deletions(-) | ||
26 | |||
27 | diff --git a/xcore/base/xcam_common.h b/xcore/base/xcam_common.h | ||
28 | index 1f16e1e..4aa6cb9 100644 | ||
29 | --- a/xcore/base/xcam_common.h | ||
30 | +++ b/xcore/base/xcam_common.h | ||
31 | @@ -75,7 +75,7 @@ void xcam_free (void *ptr); | ||
32 | * return, 0 successfully | ||
33 | * else, check errno | ||
34 | */ | ||
35 | -int xcam_device_ioctl (int fd, int cmd, void *arg); | ||
36 | +int xcam_device_ioctl (int fd, uint32_t cmd, void *arg); | ||
37 | const char *xcam_fourcc_to_string (uint32_t fourcc); | ||
38 | |||
39 | void xcam_set_log (const char* file_name); | ||
40 | diff --git a/xcore/fake_v4l2_device.h b/xcore/fake_v4l2_device.h | ||
41 | index f679c19..e29787d 100644 | ||
42 | --- a/xcore/fake_v4l2_device.h | ||
43 | +++ b/xcore/fake_v4l2_device.h | ||
44 | @@ -33,7 +33,7 @@ public: | ||
45 | : V4l2Device ("/dev/null") | ||
46 | {} | ||
47 | |||
48 | - int io_control (int cmd, void *arg) | ||
49 | + int io_control (uint32_t cmd, void *arg) | ||
50 | { | ||
51 | XCAM_UNUSED (arg); | ||
52 | |||
53 | diff --git a/xcore/v4l2_device.cpp b/xcore/v4l2_device.cpp | ||
54 | index 395461e..66a8ac6 100644 | ||
55 | --- a/xcore/v4l2_device.cpp | ||
56 | +++ b/xcore/v4l2_device.cpp | ||
57 | @@ -185,7 +185,7 @@ V4l2Device::close () | ||
58 | } | ||
59 | |||
60 | int | ||
61 | -V4l2Device::io_control (int cmd, void *arg) | ||
62 | +V4l2Device::io_control (uint32_t cmd, void *arg) | ||
63 | |||
64 | { | ||
65 | if (_fd <= 0) | ||
66 | diff --git a/xcore/v4l2_device.h b/xcore/v4l2_device.h | ||
67 | index b4ad7ad..2551a92 100644 | ||
68 | --- a/xcore/v4l2_device.h | ||
69 | +++ b/xcore/v4l2_device.h | ||
70 | @@ -104,7 +104,7 @@ public: | ||
71 | XCamReturn queue_buffer (SmartPtr<V4l2Buffer> &buf); | ||
72 | |||
73 | // use as less as possible | ||
74 | - virtual int io_control (int cmd, void *arg); | ||
75 | + virtual int io_control (uint32_t cmd, void *arg); | ||
76 | |||
77 | protected: | ||
78 | |||
79 | diff --git a/xcore/xcam_common.cpp b/xcore/xcam_common.cpp | ||
80 | index 848884d..d4d5093 100644 | ||
81 | --- a/xcore/xcam_common.cpp | ||
82 | +++ b/xcore/xcam_common.cpp | ||
83 | @@ -53,7 +53,7 @@ void xcam_free(void *ptr) | ||
84 | free (ptr); | ||
85 | } | ||
86 | |||
87 | -int xcam_device_ioctl (int fd, int cmd, void *arg) | ||
88 | +int xcam_device_ioctl (int fd, uint32_t cmd, void *arg) | ||
89 | { | ||
90 | int ret = 0; | ||
91 | int tried_time = 0; | ||
92 | -- | ||
93 | 2.25.1 | ||
94 | |||
diff --git a/recipes-core/libxcam/libxcam/0001-test-soft-image.cpp-fix-header-path.patch b/recipes-core/libxcam/libxcam/0001-test-soft-image.cpp-fix-header-path.patch deleted file mode 100644 index 67db3e4c..00000000 --- a/recipes-core/libxcam/libxcam/0001-test-soft-image.cpp-fix-header-path.patch +++ /dev/null | |||
@@ -1,37 +0,0 @@ | |||
1 | From 8f8a1d131a05aa1494825f0fae32580cbed680e5 Mon Sep 17 00:00:00 2001 | ||
2 | From: Naveen Saini <naveen.kumar.saini@intel.com> | ||
3 | Date: Thu, 25 Jun 2020 14:22:59 +0800 | ||
4 | Subject: [PATCH] test-soft-image.cpp: fix header path | ||
5 | |||
6 | throw compilation error: | ||
7 | | ../../git/tests/test-soft-image.cpp:31:10: fatal error: xcore/fisheye_dewarp.h: No such file or directory | ||
8 | | 31 | #include <xcore/fisheye_dewarp.h> | ||
9 | | | ^~~~~~~~~~~~~~~~~~~~~~~~ | ||
10 | | compilation terminated. | ||
11 | |||
12 | TEST_BASE_CXXFLAGS already includes -I$(top_srcdir)/xcore | ||
13 | |||
14 | Ref: https://github.com/intel/libxcam/blob/1.4.0/tests/Makefile.am#L48 | ||
15 | |||
16 | Upstream-Status: Submitted [https://github.com/intel/libxcam/pull/734] | ||
17 | Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com> | ||
18 | --- | ||
19 | tests/test-soft-image.cpp | 2 +- | ||
20 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
21 | |||
22 | diff --git a/tests/test-soft-image.cpp b/tests/test-soft-image.cpp | ||
23 | index a9e02d8..1c687e5 100644 | ||
24 | --- a/tests/test-soft-image.cpp | ||
25 | +++ b/tests/test-soft-image.cpp | ||
26 | @@ -28,7 +28,7 @@ | ||
27 | #include <interface/blender.h> | ||
28 | #include <interface/geo_mapper.h> | ||
29 | #include <interface/stitcher.h> | ||
30 | -#include <xcore/fisheye_dewarp.h> | ||
31 | +#include <fisheye_dewarp.h> | ||
32 | |||
33 | #define MAP_WIDTH 3 | ||
34 | #define MAP_HEIGHT 4 | ||
35 | -- | ||
36 | 2.17.1 | ||
37 | |||