Giter Club home page Giter Club logo

Comments (4)

bvanassche avatar bvanassche commented on July 28, 2024

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.

rms95 avatar rms95 commented on July 28, 2024

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.

bvanassche avatar bvanassche commented on July 28, 2024

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.

rms95 avatar rms95 commented on July 28, 2024

I just verified this to be working.

from net-snmp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.