]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Fix the following -Werror warning from clang 10.0.0 in bsnmpd:
authordim <dim@FreeBSD.org>
Wed, 29 Jan 2020 21:40:35 +0000 (21:40 +0000)
committerdim <dim@FreeBSD.org>
Wed, 29 Jan 2020 21:40:35 +0000 (21:40 +0000)
commitea9580a01021a9c741c5493c7a78b7ef20c96e65
tree7a064159925408c599f208507291dd478cb854a9
parent85e99fcd38f2b435b09dc0c360b115b4ae9eb552
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
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c