[OpenBIOS] [commit] r861 - in trunk/openbios-devel: . arch/ppc/qemu arch/sparc32 arch/sparc64 arch/x86 drivers include/drivers
repository service
svn at openbios.org
Mon Sep 6 22:56:55 CEST 2010
Author: blueswirl
Date: Mon Sep 6 22:56:54 2010
New Revision: 861
URL: http://tracker.coreboot.org/trac/openbios/changeset/861
Log:
Enable GCC warning flag -Wnested-externs, fix warnings
Move nested extern declarations into header files, or use the
already existing declarations.
Signed-off-by: Blue Swirl <blauwirbel at gmail.com>
Modified:
trunk/openbios-devel/Makefile.target
trunk/openbios-devel/arch/ppc/qemu/init.c
trunk/openbios-devel/arch/sparc32/context.c
trunk/openbios-devel/arch/sparc64/context.c
trunk/openbios-devel/arch/x86/context.c
trunk/openbios-devel/arch/x86/openbios.c
trunk/openbios-devel/arch/x86/openbios.h
trunk/openbios-devel/drivers/timer.c
trunk/openbios-devel/drivers/timer.h
trunk/openbios-devel/include/drivers/drivers.h
Modified: trunk/openbios-devel/Makefile.target
==============================================================================
--- trunk/openbios-devel/Makefile.target Mon Sep 6 22:56:52 2010 (r860)
+++ trunk/openbios-devel/Makefile.target Mon Sep 6 22:56:54 2010 (r861)
@@ -12,7 +12,7 @@
HOSTCFLAGS+= -O2 -g -DFCOMPILER -DBOOTSTRAP $(CROSSCFLAGS)
HOSTCFLAGS+= -Wall -Wredundant-decls -Wshadow -Wpointer-arith
HOSTCFLAGS+= -Wstrict-prototypes -Wmissing-declarations -Wundef -Wendif-labels
-HOSTCFLAGS+= -Wstrict-aliasing -Wwrite-strings -Wmissing-prototypes
+HOSTCFLAGS+= -Wstrict-aliasing -Wwrite-strings -Wmissing-prototypes -Wnested-externs
HOSTCFLAGS+= -W
HOSTINCLUDES := -I$(SRCDIR)/include -I$(SRCDIR)/kernel -I$(SRCDIR)/kernel/include -I$(ODIR)/target/include
@@ -27,7 +27,7 @@
CFLAGS+= -Os -g -DNATIVE_BITWIDTH_EQUALS_HOST_BITWIDTH -USWAP_ENDIANNESS
CFLAGS+= -Wall -Wredundant-decls -Wshadow -Wpointer-arith
CFLAGS+= -Wstrict-prototypes -Wmissing-declarations -Wundef -Wendif-labels
-CFLAGS+= -Wstrict-aliasing -Wwrite-strings -Wmissing-prototypes
+CFLAGS+= -Wstrict-aliasing -Wwrite-strings -Wmissing-prototypes -Wnested-externs
CFLAGS+= -Werror
INCLUDES := -I$(SRCDIR)/include -I$(SRCDIR)/kernel/include -I$(ODIR)/target/include
AS_FLAGS+= -g
Modified: trunk/openbios-devel/arch/ppc/qemu/init.c
==============================================================================
--- trunk/openbios-devel/arch/ppc/qemu/init.c Mon Sep 6 22:56:52 2010 (r860)
+++ trunk/openbios-devel/arch/ppc/qemu/init.c Mon Sep 6 22:56:54 2010 (r861)
@@ -50,7 +50,6 @@
static uint16_t machine_id = 0;
extern void unexpected_excep( int vector );
-extern void setup_timers( void );
void
unexpected_excep( int vector )
Modified: trunk/openbios-devel/arch/sparc32/context.c
==============================================================================
--- trunk/openbios-devel/arch/sparc32/context.c Mon Sep 6 22:56:52 2010 (r860)
+++ trunk/openbios-devel/arch/sparc32/context.c Mon Sep 6 22:56:54 2010 (r861)
@@ -8,6 +8,7 @@
#include "context.h"
#include "libopenbios/sys_info.h"
#include "boot.h"
+#include "openbios.h"
#define MAIN_STACK_SIZE 16384
#define IMAGE_STACK_SIZE 4096
@@ -46,7 +47,6 @@
static void start_main(void)
{
int retval;
- extern int openbios(void);
/* Save startup context, so we can refer to it later.
* We have to keep it in physical address since we will relocate. */
Modified: trunk/openbios-devel/arch/sparc64/context.c
==============================================================================
--- trunk/openbios-devel/arch/sparc64/context.c Mon Sep 6 22:56:52 2010 (r860)
+++ trunk/openbios-devel/arch/sparc64/context.c Mon Sep 6 22:56:54 2010 (r861)
@@ -8,6 +8,7 @@
#include "context.h"
#include "libopenbios/sys_info.h"
#include "boot.h"
+#include "openbios.h"
#define MAIN_STACK_SIZE 16384
#define IMAGE_STACK_SIZE 4096*2
@@ -46,7 +47,6 @@
static void start_main(void)
{
int retval;
- extern int openbios(void);
/* Save startup context, so we can refer to it later.
* We have to keep it in physical address since we will relocate. */
Modified: trunk/openbios-devel/arch/x86/context.c
==============================================================================
--- trunk/openbios-devel/arch/x86/context.c Mon Sep 6 22:56:52 2010 (r860)
+++ trunk/openbios-devel/arch/x86/context.c Mon Sep 6 22:56:54 2010 (r861)
@@ -12,6 +12,7 @@
#include "context.h"
#include "libopenbios/sys_info.h"
#include "boot.h"
+#include "openbios.h"
#define MAIN_STACK_SIZE 16384
#define IMAGE_STACK_SIZE 4096
@@ -57,8 +58,6 @@
static void start_main(void)
{
int retval;
- extern int openbios(void);
- extern void init_exceptions(void);
/* Save startup context, so we can refer to it later.
* We have to keep it in physical address since we will relocate. */
Modified: trunk/openbios-devel/arch/x86/openbios.c
==============================================================================
--- trunk/openbios-devel/arch/x86/openbios.c Mon Sep 6 22:56:52 2010 (r860)
+++ trunk/openbios-devel/arch/x86/openbios.c Mon Sep 6 22:56:54 2010 (r861)
@@ -50,8 +50,6 @@
static void
arch_init( void )
{
- void setup_timers(void);
-
openbios_init();
modules_init();
#ifdef CONFIG_DRIVER_PCI
Modified: trunk/openbios-devel/arch/x86/openbios.h
==============================================================================
--- trunk/openbios-devel/arch/x86/openbios.h Mon Sep 6 22:56:52 2010 (r860)
+++ trunk/openbios-devel/arch/x86/openbios.h Mon Sep 6 22:56:54 2010 (r861)
@@ -19,6 +19,9 @@
int openbios(void);
+/* entry.S */
+void init_exceptions(void);
+
/* console.c */
extern void cls(void);
#ifdef CONFIG_DEBUG_CONSOLE
Modified: trunk/openbios-devel/drivers/timer.c
==============================================================================
--- trunk/openbios-devel/drivers/timer.c Mon Sep 6 22:56:52 2010 (r860)
+++ trunk/openbios-devel/drivers/timer.c Mon Sep 6 22:56:54 2010 (r861)
@@ -10,6 +10,7 @@
*/
#include "config.h"
+#include "drivers/drivers.h"
#include "timer.h"
#include "asm/io.h"
@@ -86,7 +87,6 @@
void udelay(unsigned int usecs)
{
- extern void _wait_ticks(unsigned long);
unsigned long ticksperusec = get_timer_freq() / 1000000;
_wait_ticks(ticksperusec * usecs);
}
Modified: trunk/openbios-devel/drivers/timer.h
==============================================================================
--- trunk/openbios-devel/drivers/timer.h Mon Sep 6 22:56:52 2010 (r860)
+++ trunk/openbios-devel/drivers/timer.h Mon Sep 6 22:56:54 2010 (r861)
@@ -48,13 +48,15 @@
#define PPCB_SPKR 0x02 /* Bit 1 */
#define PPCB_T2GATE 0x01 /* Bit 0 */
-extern void setup_timers(void);
extern void ndelay(unsigned int nsecs);
extern void udelay(unsigned int usecs);
extern void mdelay(unsigned int msecs);
extern unsigned long currticks(void);
extern unsigned long get_timer_freq(void);
+/* arch/ppc/timebase.S */
+void _wait_ticks(unsigned long nticks);
+
#define TICKS_PER_SEC 1000
#endif /* TIMER_H */
Modified: trunk/openbios-devel/include/drivers/drivers.h
==============================================================================
--- trunk/openbios-devel/include/drivers/drivers.h Mon Sep 6 22:56:52 2010 (r860)
+++ trunk/openbios-devel/include/drivers/drivers.h Mon Sep 6 22:56:54 2010 (r861)
@@ -123,4 +123,8 @@
unsigned char keyboard_readdata(void);
#endif
#endif
+
+/* drivers/timer.c */
+void setup_timers(void);
+
#endif /* OPENBIOS_DRIVERS_H */
More information about the OpenBIOS
mailing list