svn commit: r357271 - projects/clang1000-import/usr.sbin/bsnmpd/modules/snmp_bridge
Dimitry Andric
dim at FreeBSD.org
Wed Jan 29 21:40:35 UTC 2020
Author: dim
Date: Wed Jan 29 21:40:35 2020
New Revision: 357271
URL: https://svnweb.freebsd.org/changeset/base/357271
Log:
Fix the following -Werror warning from clang 10.0.0 in bsnmpd:
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c:1235:43: error: overlapping comparisons always evaluate to true [-Werror,-Wtautological-overlap-compare]
begemotBridgeStpPortEnable_enabled ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
Work around it by casting the enum values to the type of val->v.integer.
MFC after: 3 days
Modified:
projects/clang1000-import/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
Modified: projects/clang1000-import/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
==============================================================================
--- projects/clang1000-import/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c Wed Jan 29 21:09:36 2020 (r357270)
+++ projects/clang1000-import/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c Wed Jan 29 21:40:35 2020 (r357271)
@@ -1232,9 +1232,9 @@ op_begemot_stp_port(struct snmp_context *ctx, struct s
case LEAF_begemotBridgeStpPortEnable:
if (val->v.integer !=
- begemotBridgeStpPortEnable_enabled ||
+ (int32_t)begemotBridgeStpPortEnable_enabled ||
val->v.integer !=
- begemotBridgeStpPortEnable_disabled)
+ (int32_t)begemotBridgeStpPortEnable_disabled)
return (SNMP_ERR_WRONG_VALUE);
ctx->scratch->int1 = bp->enable;
More information about the svn-src-projects
mailing list