HomeFreeBSD

MFstable/10 r300471:

Description

MFstable/10 r300471:

MFC r299712,r299759,r299760,r299761,r299762:

r299712:

Fix some trivial clang/gcc warnings in bsnmptc.c

  • By definition, enum snmp_tc can't be false (the implied starting sequence index for the enum is 0). Don't test for it being < 0.
  • Staticize struct snmp_text_conv to mute a -Wmissing-variable-declarations warning from clang.
  • Remove set but unused variable, ptr, in parse_bridge_id(..) and parse_bport_id(..) to mute warning from gcc 4.9+.
  • Mark value and string unused in snmp_inetaddr2oct(..) and parse_inetaddr(..) as they're just stub functions.

r299759:

Use calloc instead of memset(.., 0, ..) + malloc

r299760:

Sort variables in parse_ascii(..) per style(9)

r299761:

parse_ascii: make count size_t to mute a -Wsign-compare issue

count is always unsigned.

r299762:

Mark snmptoolctx unused in parse_authentication(..), parse_privacy(..),
parse_context(..), and parse_user_security(..).

Details

Provenance
ngieAuthored on
Parents
rS300557: It seems <sys/types.h> is a new prerequisite for <bitstring.h> after
Branches
Unknown
Tags
Unknown