On 2026/11/11 07:01, Bart Van Assche wrote:
> On 11/11/26 3:28 AM, Stuart Henderson wrote:
> > Probably not a show-stopper, but this fixes --enable-read-only build:
> >
> > Index: snmplib/snmp_api.c
> > --- snmplib/snmp_api.c.orig
> > +++ snmplib/snmp_api.c
> > @@ -3069,11 +3069,12 @@ _snmp_build(u_char ** pkt, size_t * pkt_len, size_t
> > *
> > switch (pdu->command) {
> > case SNMP_MSG_RESPONSE:
> > netsnmp_assert(0 == (pdu->flags & UCD_MSG_FLAG_EXPECT_RESPONSE));
> > -#ifndef NETSNMP_NOTIFY_ONLY
> > +#if !defined(NETSNMP_NOTIFY_ONLY) && !defined(NETSNMP_NO_WRITE_SUPPORT)
> > NETSNMP_FALLTHROUGH;
> > +#endif
> > +#ifndef NETSNMP_NOTIFY_ONLY
> > case SNMP_MSG_GET:
> > case SNMP_MSG_GETNEXT:
> > - NETSNMP_FALLTHROUGH;
> > #endif /* ! NETSNMP_NOTIFY_ONLY */
> > #ifndef NETSNMP_NO_WRITE_SUPPORT
> > case SNMP_MSG_SET:
>
> Let's keep any compiler warning fixes for after the 5.10 release.
>
> Additionally, more changes are required than the above to fix the
> compiler warnings for the read-only build.
>
> Thanks,
>
> Bart.
At least with clang, build does error out. I have no opinion whether
it's important or not though, so no problem as far as I'm concerned
to wait until after 5.10.
cc -MMD -MP -MF snmp_api.d -MT snmp_api.lo -I../include -I. -I../snmplib
-D_GNU_SOURCE -D_ALL_SOURCE -D_THREAD_SAFE -D__EXTENSIONS__ -O2 -pipe -g
-DNETSNMP_ENABLE_IPV6 -fno-strict-aliasing -DNETSNMP_REMOVE_U64 -O2 -pipe -g
-Uopenbsd8 -Dopenbsd8=openbsd8 -DNO_LOCALE_NUMERIC -DNO_LOCALE_COLLATE
-DNO_LOCALE_NUMERIC -DNO_LOCALE_COLLATE -DNO_LOCALE_MONETARY -DNO_LOCALE_TIME
-DNO_LOCALE_MESSAGES -DLIBC_HANDLES_MISMATCHED_CTYPE -fno-strict-aliasing
-fno-delete-null-pointer-checks -pipe -fstack-protector-strong
-I/usr/local/include -I/usr/libdata/perl5/amd64-openbsd/CORE -c snmp_api.c
-fPIC -DPIC -o .libs/snmp_api.o
snmp_api.c:3076:9: error: fallthrough annotation does not directly precede
switch label
3076 | NETSNMP_FALLTHROUGH;
| ^
../include/net-snmp/net-snmp-config.h:2449:33: note: expanded from macro
'NETSNMP_FALLTHROUGH'
2449 | # define NETSNMP_FALLTHROUGH __attribute__((__fallthrough__))
| ^
1 error generated.
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders