svn commit: r357520 - in stable: 10/usr.sbin/bsnmpd/modules/snmp_bridge 11/usr.sbin/bsnmpd/modules/snmp_bridge 12/usr.sbin/bsnmpd/modules/snmp_bridge
Dimitry Andric
dim at FreeBSD.org
Tue Feb 4 19:35:40 UTC 2020
Author: dim
Date: Tue Feb 4 19:35:40 2020
New Revision: 357520
URL: https://svnweb.freebsd.org/changeset/base/357520
Log:
MFC r357272:
Merge r357271 from the clang1000-import branch:
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.
Modified:
stable/12/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
Directory Properties:
stable/12/ (props changed)
Changes in other areas also in this revision:
Modified:
stable/10/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
stable/11/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
Directory Properties:
stable/10/ (props changed)
stable/11/ (props changed)
Modified: stable/12/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
==============================================================================
--- stable/12/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c Tue Feb 4 19:31:01 2020 (r357519)
+++ stable/12/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c Tue Feb 4 19:35:40 2020 (r357520)
@@ -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-stable-12
mailing list