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
This commit is contained in:
parent
bb1d0df511
commit
3fd49cf90e
@ -1232,9 +1232,9 @@ op_begemot_stp_port(struct snmp_context *ctx, struct snmp_value *val,
|
||||
|
||||
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;
|
||||
|
Loading…
Reference in New Issue
Block a user