Skip to content

Fix compiler warnings #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

FloEdelmann
Copy link

When running make with the original source file, I got the following warnings:

In file included from /usr/include/CL/cl.h:32,
                 from main.c:7:
/usr/include/CL/cl_version.h:34:9: note: #pragma message: cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 220 (OpenCL 2.2)
   34 | #pragma message("cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 220 (OpenCL 2.2)")
      |         ^~~~~~~
main.c: In function ‘main’:
main.c:50:5: warning: ‘clCreateCommandQueue’ is deprecated [-Wdeprecated-declarations]
   50 |     cl_command_queue command_queue = clCreateCommandQueue(context, device_id, 0, &ret);
      |     ^~~~~~~~~~~~~~~~
In file included from main.c:7:
/usr/include/CL/cl.h:1781:1: note: declared here
 1781 | clCreateCommandQueue(cl_context                     context,
      | ^~~~~~~~~~~~~~~~~~~~

I resolved them by specifying an explicit OpenCL version and replacing the deprecated clCreateCommandQueue call with the equivalent clCreateCommandQueueWithProperties.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant