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

Warnings from campHipErrchk #121

Open
MrBurmark opened this issue Oct 6, 2022 · 0 comments
Open

Warnings from campHipErrchk #121

MrBurmark opened this issue Oct 6, 2022 · 0 comments

Comments

@MrBurmark
Copy link
Member

I see warnings with rocm coming from campHipErrchk.
I took a look in the hip headers and with c++17 the hip error type is declared with nodiscard. So while we check the error in campHipErrchk, we still get a warning because the error is returned.

In file included from ../test/resource.cpp:16:
In file included from ../include/camp/resource.hpp:27:
../include/camp/resource/hip.hpp:33:11: warning: ignoring return value of function declared with 'nodiscard' attribute [-Wunused-result]
         campHipErrchk(hipGetDevice(&prev_device));
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/camp/defines.hpp:196:28: note: expanded from macro 'campHipErrchk'
#define campHipErrchk(ans) ::camp::hipAssert((ans), #ans, __FILE__, __LINE__)
                           ^~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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

No branches or pull requests

1 participant