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/10/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
Directory Properties:
  stable/10/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/11/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
  stable/12/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
Directory Properties:
  stable/11/   (props changed)
  stable/12/   (props changed)

Modified: stable/10/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
==============================================================================
--- stable/10/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c Tue Feb  4 
19:31:01 2020        (r357519)
+++ stable/10/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c Tue Feb  4 
19:35:40 2020        (r357520)
@@ -1229,9 +1229,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;
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to