[OpenBIOS] build warnings on gcc6

Mark Cave-Ayland mark.cave-ayland at ilande.co.uk
Sun Mar 6 18:10:15 CET 2016


On 05/03/16 22:33, Cole Robinson wrote:

> openbios has some warnings (that are errors with -Werror) on gcc6. See results
> below, with gcc6 from fedora, and building openbios revision 1378
> 
> Thanks,
> Cole
> 
> 
> /builddir/build/BUILD/openbios-1.1/libc/string.c: In function 'strdup':
> /builddir/build/BUILD/openbios-1.1/libc/string.c:353:4: warning: nonnull
> argument 'str' compared to NULL [-Wnonnull-compare]
>   if( !str )
> 
> 
> In file included from /builddir/build/BUILD/openbios-1.1/drivers/sbus.c:14:0:
> /builddir/build/BUILD/openbios-1.1/drivers/sbus.c:391:14: warning:
> 'ob_sbus_node_m' defined but not used [-Wunused-const-variable]
>  NODE_METHODS(ob_sbus_node) = {
>               ^
> /builddir/build/BUILD/openbios-1.1/include/libopenbios/bindings.h:139:23:
> note: in definition of macro 'NODE_METHODS'
>  static const method_t name##_m[]
> 
> 
> In file included from /builddir/build/BUILD/openbios-1.1/arch/sparc64/lib.c:12:0:
> /builddir/build/BUILD/openbios-1.1/arch/sparc64/lib.c:444:14: warning: 'mmu_p'
> defined but not used [-Wunused-const-variable]
>  DECLARE_NODE(mmu, INSTALL_OPEN, 0, "/virtual-memory");
>               ^
> /builddir/build/BUILD/openbios-1.1/include/libopenbios/bindings.h:135:27:
> note: in definition of macro 'DECLARE_NODE'
>  static const char * const name##_p[] = { paths }; \
>                            ^~~~
> /builddir/build/BUILD/openbios-1.1/arch/sparc64/lib.c:436:14: warning:
> 'memory_p' defined but not used [-Wunused-const-variable]
>  DECLARE_NODE(memory, INSTALL_OPEN, 0, "/memory");
>               ^
> /builddir/build/BUILD/openbios-1.1/include/libopenbios/bindings.h:135:27:
> note: in definition of macro 'DECLARE_NODE'
>  static const char * const name##_p[] = { paths }; \

Apart from the -Wnonnull-compare warning in strdup (which I can only
assume figures that const char * pointers are non-null), these warnings
do appear to be valid.

Sadly I don't have gcc6 around yet (I only install released compiler
packages here) but I think I can fix these up. Do you have the complete
out for sparc32, sparc64 and ppc binaries so I can also look at these or
is it just the sparc64 build that fails?


ATB,

Mark.




More information about the OpenBIOS mailing list