[Midnightbsd-cvs] [MidnightBSD/src] 1e64fa: fix the following -Werror warning from clang 10.0....

Lucas Holt noreply at github.com
Sat Nov 14 14:52:47 EST 2020


  Branch: refs/heads/master
  Home:   https://github.com/MidnightBSD/src
  Commit: 1e64fa20e1eec4cd20074759bcf73d9d39607435
      https://github.com/MidnightBSD/src/commit/1e64fa20e1eec4cd20074759bcf73d9d39607435
  Author: Lucas Holt <luke at foolishgames.com>
  Date:   2020-11-14 (Sat, 14 Nov 2020)

  Changed paths:
    M usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c

  Log Message:
  -----------
  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.


  Commit: 9614a5bd8f448ce142782e13814ef9ac733fc890
      https://github.com/MidnightBSD/src/commit/9614a5bd8f448ce142782e13814ef9ac733fc890
  Author: Lucas Holt <luke at foolishgames.com>
  Date:   2020-11-14 (Sat, 14 Nov 2020)

  Changed paths:
    M usr.sbin/bsnmpd/modules/snmp_pf/pf_snmp.c

  Log Message:
  -----------
  Fix the following -Werror warning from clang 10.0.0 in bsnmpd:

usr.sbin/bsnmpd/modules/snmp_pf/pf_snmp.c:1661:4: error: misleading indentation; statement is not part of the previous 'else' [-Werror,-Wmisleading-indentation]
                        return (-1);
                        ^
usr.sbin/bsnmpd/modules/snmp_pf/pf_snmp.c:1658:5: note: previous statement is here
                } else
                  ^

The intent was to group the return statement with the previous syslog()
call.


Compare: https://github.com/MidnightBSD/src/compare/7aabfd6511df...9614a5bd8f44


More information about the Midnightbsd-cvs mailing list