-
Notifications
You must be signed in to change notification settings - Fork 210
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
Build warnings (-Wunused-result) fixes #51
Comments
I haven't seen any such warnings recently. On which Linux distro did you encounter these warnings? Additionally, I doubt that this patch is sufficient for all gcc versions. Please introduce a macro for suppressing these warnings such that the implementation of that macro can be modified easily, e.g. something like this (untested):
|
A macro would indeed be better, though I was not sure where to place the macro. Currently I'm building on Debian 10, gcc 8.3. These of course only come up with a clean build / rebuild of those files, which is why I usually prefer building with -Werror. If you're not seeing them, it may have something to do with the configuration I am building with.
|
I have been able to reproduce the reported warnings by building the Net-SNMP code with -D_FORTIFY_SOURCE=1. A patch that fixes these warnings has been checked in. Please update your local copy of the Net-SNMP code and retest. |
I just verified this to be working. |
See patch below to fix some -Wunused-result warnings during build of net-snmp.
It may be wise to return an error in some cases instead of just ignoring the result.
The text was updated successfully, but these errors were encountered: