Date: Tue, 4 Feb 2020 19:35:40 +0000 (UTC) From: Dimitry Andric <dim@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: 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 Message-ID: <202002041935.014JZelb058284@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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/11/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c stable/12/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c Directory Properties: stable/10/ (props changed) stable/12/ (props changed) Modified: stable/11/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c ============================================================================== --- stable/11/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c Tue Feb 4 19:31:01 2020 (r357519) +++ stable/11/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c Tue Feb 4 19:35:40 2020 (r357520) @@ -1231,9 +1231,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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202002041935.014JZelb058284>