-
Notifications
You must be signed in to change notification settings - Fork 116
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
[UR] Check for unused parameters #861
[UR] Check for unused parameters #861
Conversation
fc8e261
to
e14e8bc
Compare
test/loader/platforms/platforms.cpp
Outdated
@@ -18,7 +18,7 @@ | |||
using namespace logger; | |||
|
|||
////////////////////////////////////////////////////////////////////////// | |||
int main(int argc, char *argv[]) { | |||
int main([[maybe_unused]] int argc, [[maybe_unused]] char *argv[]) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think in this case we should just remove these arguments instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's no need to use [[maybe_unused]]
. You can just omit the parameter name.
Do you mean in every occurrence or just the one Benie mentioned above? I thinking it |
e14e8bc
to
747613b
Compare
My preference would be to get rid of it entirely except for the functions where the parameter is really "maybe unused" (like in |
Since UR is imported as a library to different project, we should make sure we don't cause warnings with their compiler. A common warning is for unused parameters so we should ensure we don't raise this warning when compiling the code.