diff options
author | Max Krummenacher <max.krummenacher@toradex.com> | 2024-06-01 13:12:14 +0200 |
---|---|---|
committer | Max Krummenacher <max.krummenacher@toradex.com> | 2024-06-01 15:42:46 +0200 |
commit | e836f27b1cf3bee0ac23360428b17a4c10c6f414 (patch) | |
tree | 731b0dc4ffd5a8a0a003952417c0c9c5e5aabded | |
parent | 7bc77fd26ec73e50154b920b808302f8cc4ad6ac (diff) | |
download | meta-freescale-e836f27b1cf3bee0ac23360428b17a4c10c6f414.tar.gz |
imx-opencl-converter: fix compile time error
GCC-14 set more warnings to errors, fix the code.
Fixes:
| .../src/ocl.c:258: 22: error: passing argument 6 of 'clGetProgramBuildInfo' from incompatible pointer type [-Wincompatible-pointer-types]
Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
-rw-r--r-- | recipes-multimedia/imx-opencl-converter/imx-opencl-converter/0001-src-ocl.c-fix-wrong-integer-type.patch | 38 | ||||
-rw-r--r-- | recipes-multimedia/imx-opencl-converter/imx-opencl-converter_0.2.0.bb | 5 |
2 files changed, 42 insertions, 1 deletions
diff --git a/recipes-multimedia/imx-opencl-converter/imx-opencl-converter/0001-src-ocl.c-fix-wrong-integer-type.patch b/recipes-multimedia/imx-opencl-converter/imx-opencl-converter/0001-src-ocl.c-fix-wrong-integer-type.patch new file mode 100644 index 00000000..deb81046 --- /dev/null +++ b/recipes-multimedia/imx-opencl-converter/imx-opencl-converter/0001-src-ocl.c-fix-wrong-integer-type.patch | |||
@@ -0,0 +1,38 @@ | |||
1 | From e78af6d0c9cd1a655f6bc17173f6c411b8b34d2f Mon Sep 17 00:00:00 2001 | ||
2 | From: Max Krummenacher <max.krummenacher@toradex.com> | ||
3 | Date: Sat, 1 Jun 2024 11:07:13 +0000 | ||
4 | Subject: [PATCH] src/ocl.c: fix wrong integer type | ||
5 | |||
6 | Fixes: | ||
7 | | .../ocl.c:258:22: error: passing argument 6 of 'clGetProgramBuildInfo' from incompatible pointer type [-Wincompatible-pointer-types] | ||
8 | 258 | 0, NULL, &log_size); | ||
9 | | ^~~~~~~~~ | ||
10 | | | | ||
11 | | int * | ||
12 | In file included from .../recipe-sysroot/usr/include/CL/cl_ext.h:27, | ||
13 | from .../ocl.c:21: | ||
14 | /recipe-sysroot/usr/include/CL/cl.h:1348:45: note: expected 'size_t *' {aka 'long unsigned int *'} but argument is of type 'int *' | ||
15 | 1348 | size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_1_0; | ||
16 | | ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~ | ||
17 | |||
18 | Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> | ||
19 | --- | ||
20 | src/ocl.c | 2 +- | ||
21 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
22 | |||
23 | diff --git a/src/ocl.c b/src/ocl.c | ||
24 | index f56d9cb..b2b0c52 100644 | ||
25 | --- a/src/ocl.c | ||
26 | +++ b/src/ocl.c | ||
27 | @@ -253,7 +253,7 @@ static OCL_RESULT CreateProgram(ImxOcl* ocl, const char* binName, const char* sr | ||
28 | cl_ret = clBuildProgram (program, 1, &ocl->device, "", NULL, NULL); | ||
29 | if (cl_ret < 0) | ||
30 | { | ||
31 | - int log_size; | ||
32 | + size_t log_size; | ||
33 | cl_ret = clGetProgramBuildInfo(program, ocl->device, CL_PROGRAM_BUILD_LOG, | ||
34 | 0, NULL, &log_size); | ||
35 | |||
36 | -- | ||
37 | 2.42.0 | ||
38 | |||
diff --git a/recipes-multimedia/imx-opencl-converter/imx-opencl-converter_0.2.0.bb b/recipes-multimedia/imx-opencl-converter/imx-opencl-converter_0.2.0.bb index 3dc0a7ea..f3e33e0d 100644 --- a/recipes-multimedia/imx-opencl-converter/imx-opencl-converter_0.2.0.bb +++ b/recipes-multimedia/imx-opencl-converter/imx-opencl-converter_0.2.0.bb | |||
@@ -5,7 +5,10 @@ SECTION = "multimedia" | |||
5 | LIC_FILES_CHKSUM = "file://COPYING;md5=44a8052c384584ba09077e85a3d1654f" | 5 | LIC_FILES_CHKSUM = "file://COPYING;md5=44a8052c384584ba09077e85a3d1654f" |
6 | DEPENDS = "opencl-headers" | 6 | DEPENDS = "opencl-headers" |
7 | 7 | ||
8 | SRC_URI = "${FSL_MIRROR}/${BP}.bin;fsl-eula=true" | 8 | SRC_URI = " \ |
9 | ${FSL_MIRROR}/${BP}.bin;fsl-eula=true \ | ||
10 | file://0001-src-ocl.c-fix-wrong-integer-type.patch \ | ||
11 | " | ||
9 | SRC_URI[md5sum] = "dc668682189ce740fb46073e62f58066" | 12 | SRC_URI[md5sum] = "dc668682189ce740fb46073e62f58066" |
10 | SRC_URI[sha256sum] = "9f283df500c57421b87d96d9af7022ab490bc241aa28d00755beaadabbcd754b" | 13 | SRC_URI[sha256sum] = "9f283df500c57421b87d96d9af7022ab490bc241aa28d00755beaadabbcd754b" |
11 | 14 | ||