Skip to content

Conversation

@ldorau
Copy link
Contributor

@ldorau ldorau commented Nov 4, 2025

Fix the following warnings in appendKernelLaunchWithArgsExpNew():

warning: cast from type ‘X’ to type ‘void*’ casts away qualifiers [-Wcast-qual]

@ldorau ldorau requested a review from a team as a code owner November 4, 2025 08:10
@ldorau ldorau requested a review from pbalcer November 4, 2025 08:11
Fix following warnings in appendKernelLaunchWithArgsExpNew():

warning: cast from type ‘X’ to type ‘void*’ casts away qualifiers [-Wcast-qual]

Signed-off-by: Lukasz Dorau <[email protected]>
case UR_EXP_KERNEL_ARG_TYPE_VALUE:
hKernel->kernelArgs[argIndex] = (void *)pArgs[argIndex].value.value;
hKernel->kernelArgs[argIndex] =
const_cast<void *>(pArgs[argIndex].value.value);
Copy link
Contributor

Choose a reason for hiding this comment

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

It's weird that we have to remove the const qualifier, the arg types in the spec should reflect params accepted by the underlying backend (in this case only L0, and it accepts void **). Perhaps we could remove const keywords from the spec? @pbalcer

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.

2 participants