new warning in libmisc/capture

Chris Johns chrisj at rtems.org
Mon Jun 12 02:31:51 UTC 2017


On 12/6/17 10:09 am, Joel Sherrill wrote:
> Not sure the best way to fix this warning that occurs in 161 BSPs. :(
> 
>     161
> ../../../../../../rtems/c/src/../../cpukit/libmisc/capture/rtems-trace-buffer-vars.c:22:12:
> warning: duplicate 'const' declaration specifier [-Wduplicate-decl-specifier]
> 
> The code is
> 
> const char const* __rtld_trace_names[1] __attribute__ ((weak));
> 

I think this should be:

const char* const __rtld_trace_names[1] __attribute__ ((weak));

?

> I am guessing that the intent was to put the second const on the right
> hand side of the *. Or not to have a second one. 
> 
> Thoughts?

The rtems-tools.git repo will need a change as well:

https://git.rtems.org/rtems-tools/tree/linkers/rtems-tld.cpp#n994

Thanks
Chris



More information about the devel mailing list