Author: dim
Date: Wed Jan 29 21:41:45 2020
New Revision: 357272
URL: https://svnweb.freebsd.org/changeset/base/357272

Log:
  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.
  
  MFC after:    3 days

Modified:
  head/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
Directory Properties:
  head/   (props changed)

Modified: head/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
==============================================================================
--- head/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c      Wed Jan 29 
21:40:35 2020        (r357271)
+++ head/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c      Wed Jan 29 
21:41:45 2020        (r357272)
@@ -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;
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to