[OpenBIOS] build warnings on gcc6

Programmingkid programmingkidx at gmail.com
Sun Mar 6 16:23:26 CET 2016


On Mar 5, 2016, at 5:33 PM, 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 }; \

Thank you very much for alerting us to this problem. I think it is time for this patch:

makefile.target: Remove Werror

Just because a warning is issued by the compiler doesn't mean the OpenBIOS binary is broken. Werror is used to halt building if the compiler issues a warning. This patch removes Werror so building can continue after such a warning.

Signed-off-by: John Arbuckle <programmingkidx at gmail.com>

Index: Makefile.target
===================================================================
--- Makefile.target	(revision 1391)
+++ Makefile.target	(working copy)
@@ -29,7 +29,6 @@
 CFLAGS+= -Wall -Wredundant-decls -Wshadow -Wpointer-arith
 CFLAGS+= -Wstrict-prototypes -Wmissing-declarations -Wundef -Wendif-labels
 CFLAGS+= -Wstrict-aliasing -Wwrite-strings -Wmissing-prototypes -Wnested-externs
-CFLAGS+= -Werror
 # Flags for dependency generation
 CFLAGS+= -MMD -MP -MT $@ -MF '$(*D)/$(*F).d'
 INCLUDES := -I$(SRCDIR)/include -I$(SRCDIR)/kernel/include -I$(ODIR)/target/include




More information about the OpenBIOS mailing list