Package: clblas
Version: 2.12-5
Severity: serious
Tags: patch


Dear Maintainer,


gcc-14 changed some warnings into errors.
I checked codesearch.debian.org and found something that might be considered a 
patch and submitted upstream.

At least now the example code compiles correctly, this is why I'm tagging it as 
patch (and this is just an example code, so
we can ignore the sanity of the approach)

Feel free to adapt it if needed.

Thanks for considering the patch.


diff -Nru clblas-2.12/debian/patches/361.patch 
clblas-2.12/debian/patches/361.patch
--- clblas-2.12/debian/patches/361.patch        1970-01-01 01:00:00.000000000 
+0100
+++ clblas-2.12/debian/patches/361.patch        2024-08-02 09:02:48.000000000 
+0200
@@ -0,0 +1,55 @@
+From c8df417ce2a7ee644bb6e997ec37b85450496e8c Mon Sep 17 00:00:00 2001
+From: Gianfranco Costamagna <costamagnagianfra...@yahoo.it>
+Date: Fri, 2 Aug 2024 09:02:32 +0200
+Subject: [PATCH] Update example_ctrsm.c
+
+Fixup a failure due to
+
+[ 16%] Building C object CMakeFiles/example_ctrsm.dir/example_ctrsm.c.o
+In file included from /usr/include/CL/cl.h:20,
+                 from /usr/include/clBLAS.h:35,
+                 from /tmp/example_ctrsm.c:25:
+/usr/include/CL/cl_version.h:22:9: note: '#pragma message: cl_version.h: 
CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 300 (OpenCL 3.0)'
+   22 | #pragma message("cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. 
Defaulting to 300 (OpenCL 3.0)")
+      |         ^~~~~~~
+/tmp/example_ctrsm.c: In function 'main':
+/tmp/example_ctrsm.c:95:48: error: passing argument 2 of 'clGetPlatformIDs' 
from incompatible pointer type [-Wincompatible-pointer-types]
+   95 |     err = clGetPlatformIDs(sizeof( platform ), &platform, NULL);
+      |                                                ^~~~~~~~~
+      |                                                |
+      |                                                struct _cl_platform_id 
***
+/usr/include/CL/cl.h:956:35: note: expected 'struct _cl_platform_id **' but 
argument is of type 'struct _cl_platform_id ***'
+  956 |                  cl_platform_id * platforms,
+      |                  ~~~~~~~~~~~~~~~~~^~~~~~~~~
+/tmp/example_ctrsm.c:114:5: warning: 'clCreateCommandQueue' is deprecated 
[-Wdeprecated-declarations]
+  114 |     queue = clCreateCommandQueue(ctx, device, 0, &err);
+      |     ^~~~~
+/usr/include/CL/cl.h:1914:1: note: declared here
+ 1914 | clCreateCommandQueue(cl_context                     context,
+      | ^~~~~~~~~~~~~~~~~~~~
+---
+ src/samples/example_ctrsm.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/samples/example_ctrsm.c b/src/samples/example_ctrsm.c
+index 44664810..327fc2ce 100644
+--- a/src/samples/example_ctrsm.c
++++ b/src/samples/example_ctrsm.c
+@@ -81,7 +81,7 @@ int
+ main(void)
+ {
+     cl_int err;
+-    cl_platform_id platform[] = { 0, 0 };
++    cl_platform_id *platform;
+     cl_device_id device = 0;
+     cl_context_properties props[3] = { CL_CONTEXT_PLATFORM, 0, 0 };
+     cl_context ctx = 0;
+@@ -91,7 +91,7 @@ main(void)
+     int ret = 0;
+
+     /* Setup OpenCL environment. */
+-    err = clGetPlatformIDs(sizeof( platform ), &platform, NULL);
++    err = clGetPlatformIDs(sizeof( platform ), platform, NULL);
+     if (err != CL_SUCCESS) {
+         printf( "clGetPlatformIDs() failed with %d\n", err );
+         return 1;
diff -Nru clblas-2.12/debian/patches/series clblas-2.12/debian/patches/series
--- clblas-2.12/debian/patches/series   2024-04-26 18:44:20.000000000 +0200
+++ clblas-2.12/debian/patches/series   2024-08-02 09:02:59.000000000 +0200
@@ -11,3 +11,4 @@
 Fix-local-variables-not-declared-in-outermost-scope.patch
 no-implicit-declarations.patch
 missing-flags.patch
+361.patch

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

Reply via email to