[PATCH] Address several issues from compiling examples

Martin Erik Werner martinerikwerner at gmail.com
Tue Sep 3 00:31:52 UTC 2019


On Tue, 2019-09-03 at 01:48 +0200, Martin Erik Werner wrote:
> Compiling the code from examples "code-block:: c" along with public
> includes and a bsp exposed a few issues amongst a lot of false
> positives. Address some of these:
(...)

As per the sent patch, I've had some "fun" trying to run through code
examples in the documentation and looking at compile warnings.

Amongst the large amount of false positives there were quite a few more
or less significant fixes that came out of it, hopefully.

I used a *very rough* bash+awk script to do filtering and compilation,
I've attached it below if anyone dares to look.

I wonder if it might be interesting to mark a select few (or even
majority?) of the documentation examples as explicitly compilable in
isolation and adding the required include statements to them? It might
make compile-validation significantly easier in the future...

As a side effect of this I've also noticed some things which I'm really
unsure about:

The filesystem section seems very out of date, especially the
filesystem implementation part, where it seems to match the current
rtems state very poorly, I've skipped doing any updates in this section
since there seemed like major changes in both text and examples would
be needed.

With reference to ticket #3254, commit 3f575da2f2 - "Remove obsolete
network header files" removed cpukit/libnetworking/include/net/if.h.
This removed, amongst other things, the definitions for "struct ifreq"
and "struct ifaliasreq". These two are referenced and used both in
rtems-docs and in current code in rtems.

I'm wondering if I'm missing something here? Are they provided through
some other means? Are these supposed to be completely removed and all
use of them removed eventually? Do they need to be re-added for the
current code to work as it should?

-- 
Martin Erik Werner <martinerikwerner at gmail.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: compile-examples
Type: application/x-perl
Size: 2524 bytes
Desc: not available
URL: <http://lists.rtems.org/pipermail/devel/attachments/20190903/4df1d648/attachment-0002.bin>


More information about the devel mailing list