Re: [net-snmp:code] treewide: Terminate netsnmp_feature_*() uses with a semicolon

Bill Fenner via Net-snmp-coders <[email protected]>
Newsgroups gmane.network.net-snmp.devel
Message-ID <CAF4SogZxS6ycvuQG72-vVohg5NwMUgKq_8NGgZr2eVF6geA02w@mail.gmail.com>
On Mon, Aug 26, 2019 at 11:48 AM Bill Fenner <[email protected]>
wrote:

> On Tue, Aug 13, 2019 at 11:17 PM net-snmp Git repository <
> [email protected]> wrote:
>
>> Branch: V5-8-patches
>>
>> treewide: Terminate netsnmp_feature_*() uses with a semicolon
>>
>> This patch has been generated by the following shell command:
>>
>> git grep -l netsnmp_feature_ |
>> while read f; do sed -i 's/^netsnmp_feature.*[^;]$/&;/' "$f"; done
>>
>> By Bart Van Assche on 08/14/2019 02:58
>>
>
> Hi Bart,
>
> Thank you very much for all the cleanups you've been working on recently.
> I really appreciate it.
>
> Have you tried using features with this change?  I am getting errors like:
>
> [net-snmp] In file included from
> *../include/net-snmp/net-snmp-features.h:11:0*,
>
> [net-snmp]                  from *snmp_client.c:48*:
>
> [net-snmp] *../include/net-snmp/agent/features.h:4:39:* *error: *ISO C99
> requires whitespace after the macro name [*-Werror*]
>
> [net-snmp]  #define NETSNMP_FEATURE_HAS_BABY_STEPS*;* 1
>
> [net-snmp]                                        *^*
>
> which appear likely to be due to the feature calculation infrastructure
> not understanding these semicolons.  The semicolon seems to be making it
> into the .ft file for *some* macros but not others:
>
> ./agent/helpers/baby_steps.ft:#define NETSNMP_FEATURE_PROVIDE_*BABY_STEPS*;
> 1
>
> ./agent/helpers/baby_steps.ft:#define NETSNMP_FEATURE_*BABY_STEPS*_CHILD_OF_MIB_HELPERS;
> 1
>
> ./agent/helpers/baby_steps.ft:#define NETSNMP_FEATURE_PROVIDE_*BABY_STEPS*
> 1
>
> ./agent/helpers/baby_steps.ft:#define NETSNMP_FEATURE_NETSNMP_*BABY_STEPS*_HANDLER_INIT_CHILD_OF_NETSNMP_UNUSED;
> 1
>
> ./agent/helpers/baby_steps.ft:#define NETSNMP_FEATURE_PROVIDE_NETSNMP_
> *BABY_STEPS*_HANDLER_INIT 1
>
> I'm happy to dig into this, but wanted to see if you had seen it already.
> (Not asking for a revert; let's move this forward together)
>
> It occurs to me that another thing that would be useful to dig into: why
did the Travis minimalist build not have similar problems? I'll start
exploring this too.

  Bill

_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.