Warnings on Head

Joel Sherrill joel.sherrill at oarcorp.com
Tue Sep 2 17:21:21 UTC 2014


Hi

Doing some greps and mangling on the build logs from every BSP, I
discovered we have ~2350 unique warnings output by gcc.

- ~1250 of these only occur once.
- ~1900 occur less than 5 times.
- ~2270 occur less than 10 times.

These are almost certainly in BSP specific code built for variants.
My hope is that folks take a few minutes, remove warnings from
the BSP they are using and submit a patch.

That leaves about 100 warning lines that are reported in over
ten BSP builds.

At the high end, we have a handful that show up on over 100 BSP
variants. My hope is that we can eliminate these, then focus on the
next set which impact over 50 BSP variants.   I can post the full
list if someone wants to tackle a class of warnings like unused
variables, missing prototypes, etc. 

Here are the warnings which occur more than 100 times:

    200 c/src/../../cpukit/libmisc/shell/hexdump-conv.c:145:4: warning:
format '%lc' expects argument of type 'wint_t', but argument 4 has type
'wchar_t' [-Wformat=]
    180 c/src/../../cpukit/posix/src/mprotect.c:34:5: warning: no
previous prototype for 'mprotect' [-Wmissing-prototypes]
    180 c/src/../../cpukit/libmisc/shell/main_cp.c:108:1: warning:
'rtems_shell_cp_exit' defined but not used [-Wunused-function]
    180 c/src/../../cpukit/libfs/src/rfs/rtems-rfs-inode.c:346:11:
warning: variable 'rrc' set but not used [-Wunused-but-set-variable]
    178 c/src/../../cpukit/posix/src/keyrundestructors.c:70:11: warning:
assignment discards 'const' qualifier from pointer target type [enabled
by default]
    178 c/src/../../cpukit/posix/src/keygetspecific.c:55:18: warning:
assignment discards 'const' qualifier from pointer target type [enabled
by default]
    178 c/src/../../cpukit/libfs/src/rfs/rtems-rfs-rtems.c:524:19:
warning: assignment makes integer from pointer without a cast [enabled
by default]
    178 c/src/../../cpukit/libcsupport/src/sup_fs_deviceio.c:104:15:
warning: assignment discards 'const' qualifier from pointer target type
[enabled by default]
    130 c/src/../../testsuites/sptests/spintr_err01/init.c:23:21:
warning: unused variable 'status' [-Wunused-variable]

I don't know how we have 200. There are 182 BSP log files.

Help definitely appreciated. Hopefully we can all pitch in
and reduce warnings.

Thanks.

-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel.sherrill at OARcorp.com        On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
Support Available                (256) 722-9985




More information about the devel mailing list