We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Open Babel version: 3.1 Operating system and version: Ubuntu 20.04
Code using reasonable warning level should not warn on header code
Code including directly or indirectly openbabel/base.h warns about unused
openbabel/base.h
Compile any example code with -Wall -Wextra (or anything including -Wunused-parameters).
-Wall -Wextra
-Wunused-parameters
I think there is a detail in the definition of the macro UNUSED in the same file.
UNUSED
#ifdef UNUSED #elif (__GNUC__ == 4) # define UNUSED(x) UNUSED_ ## x __attribute__((unused)) #elif defined(__LCLINT__) # define UNUSED(x) /*@unused@*/ x #else # define UNUSED(x) x // <<<<<<<<<<<<<<<< PROBLEM HERE #endif
The fallback case should be to define UNUSED(x) as empty
UNUSED(x)
# define UNUSED(x)
or
# define UNUSED(x) /**/
The text was updated successfully, but these errors were encountered:
In #2075 I use [[maybe_unused]] attribute if available.
[[maybe_unused]]
Sorry, something went wrong.
I think this change makes a lot of sense: fb7d831
No branches or pull requests
Environment Information
Open Babel version: 3.1
Operating system and version: Ubuntu 20.04
Expected Behavior
Code using reasonable warning level should not warn on header code
Actual Behavior
Code including directly or indirectly
openbabel/base.h
warns about unusedSteps to Reproduce
Compile any example code with
-Wall -Wextra
(or anything including-Wunused-parameters
).Proposed fix
I think there is a detail in the definition of the macro
UNUSED
in the same file.The fallback case should be to define
UNUSED(x)
as emptyor
The text was updated successfully, but these errors were encountered: