From: SourceForge.net <no...@so...> - 2009-08-12 09:28:30
|
Patches item #2835577, was opened at 2009-08-11 16:06 Message generated for change (Comment added) made by bvassche You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=312694&aid=2835577&group_id=12694 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Bart Van Assche (bvassche) Assigned to: Nobody/Anonymous (nobody) Summary: Fix gcc warning about constant expression Initial Comment: When compiling the Net-SNMP source code with GCC, GCC emits several warnings about constant expressions. Many of these are triggered by passing a pointer as the first argument to the macro SNMP_ZERO() of which the compiler knows that it never will be NULL. The attached patch modifies the definition of SNMP_ZERO() such that gcc does not emit a warning when this macro is used. ---------------------------------------------------------------------- >Comment By: Bart Van Assche (bvassche) Date: 2009-08-12 11:28 Message: The patch silence-SNMP_ZERO also works fine. That patch could even be improved further by replacing '\0' by 0, which is more readable IMHO. ---------------------------------------------------------------------- Comment By: Magnus Fromreide (magfr) Date: 2009-08-12 10:52 Message: I think the original patch is bad - it papers over the problem. A better patch would be to use plain memset instead of the macro on the affected locations, does my patch silence-SNMP_ZERO solve the problem for you? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=312694&aid=2835577&group_id=12694 |