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

Openthread build issues with clang/llvm #30328

Closed
nashif opened this issue Nov 30, 2020 · 0 comments · Fixed by #30332
Closed

Openthread build issues with clang/llvm #30328

nashif opened this issue Nov 30, 2020 · 0 comments · Fixed by #30332
Assignees
Labels
bug The issue is a bug, or the PR is fixing a bug priority: medium Medium impact/importance bug

Comments

@nashif
Copy link
Member

nashif commented Nov 30, 2020

When building openthread tests with llvm/clang, I get the following:

/home/nashif/Work/zephyrproject/zephyr/tests/subsys/openthread/radio_test.c:426:2: error: ignoring return value of function declared with 'warn_unused_result' attribute [-Werror,-Wunused-result]
        otPlatRadioSetTransmitPower(ot, power);
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~
/home/nashif/Work/zephyrproject/zephyr/tests/subsys/openthread/radio_test.c:432:2: error: ignoring return value of function declared with 'warn_unused_result' attribute [-Werror,-Wunused-result]
        otPlatRadioReceive(ot, chan);
        ^~~~~~~~~~~~~~~~~~ ~~~~~~~~
/home/nashif/Work/zephyrproject/zephyr/tests/subsys/openthread/radio_test.c:493:2: error: ignoring return value of function declared with 'warn_unused_result' attribute [-Werror,-Wunused-result]
        otPlatRadioSetTransmitPower(ot, -3);
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~
/home/nashif/Work/zephyrproject/zephyr/tests/subsys/openthread/radio_test.c:494:2: error: ignoring return value of function declared with 'warn_unused_result' attribute [-Werror,-Wunused-result]
        otPlatRadioGetTransmitPower(ot, &out_power);
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~
/home/nashif/Work/zephyrproject/zephyr/tests/subsys/openthread/radio_test.c:496:2: error: ignoring return value of function declared with 'warn_unused_result' attribute [-Werror,-Wunused-result]
        otPlatRadioSetTransmitPower(ot, -6);
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~
/home/nashif/Work/zephyrproject/zephyr/tests/subsys/openthread/radio_test.c:497:2: error: ignoring return value of function declared with 'warn_unused_result' attribute [-Werror,-Wunused-result]
        otPlatRadioGetTransmitPower(ot, &out_power);

We should be using the result of otPlatRadioGetTransmitPower

We need a clean clang/llvm build to be able to integrate this in CI.

This was reproduced with:

export ZEPHYR_TOOLCHAIN_VARIANT=llvm
sanitycheck -p native_posix
@nashif nashif added bug The issue is a bug, or the PR is fixing a bug priority: medium Medium impact/importance bug labels Nov 30, 2020
rlubos added a commit to rlubos/zephyr that referenced this issue Nov 30, 2020
Fix build warnings from llvm/clang build.

Fixes zephyrproject-rtos#30328

Signed-off-by: Robert Lubos <[email protected]>
nashif pushed a commit that referenced this issue Dec 3, 2020
Fix build warnings from llvm/clang build.

Fixes #30328

Signed-off-by: Robert Lubos <[email protected]>
bwasim pushed a commit to bwasim/zephyr that referenced this issue Jan 5, 2021
Fix build warnings from llvm/clang build.

Fixes zephyrproject-rtos#30328

Signed-off-by: Robert Lubos <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The issue is a bug, or the PR is fixing a bug priority: medium Medium impact/importance bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants