Comments (4)
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):
#define IGNORE_RESULT(e) do { if ((e)) { } } while (0)
from net-snmp.
A macro would indeed be better, though I was not sure where to place the macro.
In my experience (void)! does the job for the gcc / clang versions I used. (Though your macro might be more thorough)
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.
Some details about the flags I send to the configure tool: (note I added -Werror).
NETSNMP_CFG += --silent
NETSNMP_CFG += --enable-static
NETSNMP_CFG += --disable-shared
NETSNMP_CFG += --disable-embedded-perl
NETSNMP_CFG += --disable-perl-cc-checks
NETSNMP_CFG += --disable-manuals
NETSNMP_CFG += --without-root-access
NETSNMP_CFG += --with-defaults
NETSNMP_CFG += --with-mib-modules=snmp-usm-dh-objects-mib
MIBS_REMOVE += notification-log-mib snmp-notification-mib
MIBS_REMOVE += agentx ucd_snmp target utilities
MIBS_REMOVE += disman/event disman/schedule host
NETSNMP_CFG += --with-out-mib-modules="$(MIBS_REMOVE)"
NETSNMP_CFG += --without-pcre
NETSNMP_CFG += --without-nl
OPENSSL_DIR = $(SDKTARGETSYSROOT)/usr
NETSNMP_CFG += --with-openssl="$(OPENSSL_DIR)"
NETSNMP_CFG += --with-cflags="-fPIC -fpic -g -I$(OPENSSL_DIR)/include -O2 -Werror"
NETSNMP_CFG += --with-ldflags="-g -lcrypto -L$(OPENSSL_DIR) -ldl"
from net-snmp.
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.
from net-snmp.
I just verified this to be working.
from net-snmp.
Related Issues (20)
- net-snmp release 5.9.4 reports wrong version 5.9.4.pre2 HOT 4
- AES256 option for the snmpwalk not working. HOT 6
- net-snmp in ndk environment compiled with error message :unknown type name 'fd_set' && unknown type name 'ulong' HOT 5
- SEGFAULT with snmpd due to de-referencing NULL pointer with net-snmp-5.9.2 package version
- Bug report : function include_ifmib_iface_prefix not work HIGH CPU load HOT 3
- 5.9.4 cross compilation issue on configure command
- net-snmp 5.9.4 and its supported OpenSSL version HOT 4
- Authentication protocol comparison uses the passphrase rather than the protocol HOT 4
- snmpv3: Unsupported SecLevel not reported when "auth" is configured, but "noAuthNoPriv" is requested
- SIGPIPE crash in linux HOT 1
- Timeout upon unknown context name
- Linux MemAvailable value not available. HOT 6
- Snmpwalk from OL8 to AIX 5.3 timeout
- High cpu usage stuck on 100% after snmpwalk HOT 8
- SNMP 5.8: SNMPv3 user created with authNoPriv could not poll data
- SNMP 5.8: Still could poll data with SNMPv3 user even though SNMPv2 enabled HOT 1
- Net-snmp 5.9.4 does not support the Linux kernel 6.7 /proc/net/snmp file HOT 15
- Any plans to release 5.9.5? HOT 15
- 5.9.4: test suite fails HOT 4
- What is config file path for net-snmp 5.9.4? HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from net-snmp.