Skip to content

[SYCL] Fix the unused parameter warnings in the level_zero backend #4938

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

Merged
merged 1 commit into from Nov 11, 2021
Merged

[SYCL] Fix the unused parameter warnings in the level_zero backend #4938

merged 1 commit into from Nov 11, 2021

Conversation

ghost
Copy link

@ghost ghost commented Nov 11, 2021

When the compiler is built with -Werror argument, the following errors
occur:

include/sycl/ext/oneapi/backend/level_zero.hpp:125:26: error: unused parameter 'Handler' [-Werror,-Wunused-parameter]
const async_handler &Handler) {
^
include/sycl/ext/oneapi/backend/level_zero.hpp:136:55: error: unused parameter 'Handler' [-Werror,-Wunused-parameter]
const context &TargetContext, const async_handler Handler) {
^
2 errors generated.

In order to not break the API, the parameters is still declared in the
function's signatures but marked as unused via the (void)Handler
expressions.

When the compiler is built with -Werror argument, the following errors
occur:

include/sycl/ext/oneapi/backend/level_zero.hpp:125:26: error: unused parameter 'Handler' [-Werror,-Wunused-parameter]
    const async_handler &Handler) {
                         ^
include/sycl/ext/oneapi/backend/level_zero.hpp:136:55: error: unused parameter 'Handler' [-Werror,-Wunused-parameter]
    const context &TargetContext, const async_handler Handler) {
                                                      ^
2 errors generated.

In order to not break the API, the parameters is still declared in the
function's signatures but marked as unused via the (void)Handler
expressions.
@ghost ghost requested a review from vladimirlaz November 11, 2021 09:29
@ghost ghost self-requested a review as a code owner November 11, 2021 09:29
@vladimirlaz vladimirlaz merged commit cda4ed5 into intel:sycl Nov 11, 2021
@ghost ghost deleted the fix-unused-parameters-in-level-zero branch November 11, 2021 11:57
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