Skip to content
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

Fix -Wcast-qual warnings #313

Merged
merged 1 commit into from
Oct 29, 2024
Merged

Conversation

steffen-kiess
Copy link
Contributor

Cast pointers to the correct type to avoid -Wcast-qual warnings

Cast pointers to the correct type to avoid -Wcast-qual warnings
@CLAassistant
Copy link

CLAassistant commented Oct 25, 2024

CLA assistant check
All committers have signed the CLA.

@@ -9392,9 +9392,9 @@ class CommandQueue : public detail::Wrapper<cl_command_queue>
object_, userFptr, args.first, args.second,
(mem_objects != nullptr) ? (cl_uint) mem_objects->size() : 0,
(mem_objects->size() > 0 ) ? reinterpret_cast<const cl_mem *>(mem_objects->data()) : nullptr,
(mem_locs != nullptr && mem_locs->size() > 0) ? (const void **) &mem_locs->front() : nullptr,
(mem_locs != nullptr && mem_locs->size() > 0) ? const_cast<const void**>(&mem_locs->front()) : nullptr,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needing to use const_cast here is unfortunate, but I don't think there is any way to avoid it.

Linking with KhronosGroup/OpenCL-Docs#9 for completeness.

@bashbaug
Copy link
Contributor

Merging as discussed in the October 29th teleconference.

@bashbaug bashbaug merged commit 8ebe364 into KhronosGroup:main Oct 29, 2024
52 checks passed
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.

3 participants