From 1ecb21d8f4f74f9bd9d90baed1fa309255e227f0 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Mon, 13 Oct 2014 19:08:14 -0500 Subject: libbsp/i386/shared: Fix warnings --- c/src/lib/libbsp/i386/shared/comm/i386-stub.c | 16 ++++++++++------ c/src/lib/libbsp/i386/shared/irq/irq.c | 7 ++++--- c/src/lib/libbsp/i386/shared/irq/irq_asm.S | 9 ++++++--- c/src/lib/libbsp/i386/shared/pci/pcibios.c | 18 ------------------ 4 files changed, 20 insertions(+), 30 deletions(-) diff --git a/c/src/lib/libbsp/i386/shared/comm/i386-stub.c b/c/src/lib/libbsp/i386/shared/comm/i386-stub.c index d4c5eee04c..bc72396370 100644 --- a/c/src/lib/libbsp/i386/shared/comm/i386-stub.c +++ b/c/src/lib/libbsp/i386/shared/comm/i386-stub.c @@ -99,6 +99,15 @@ #include #include +/* + * Prototypes we need to avoid warnings but not going into public space. + */ +void breakpoint (void); +void set_debug_traps(void); +void set_mem_err(void); +void _returnFromException(void); +void exceptionHandler (int, void (*handler) (void)); + /************************************************************************ * * external low-level support routines @@ -106,8 +115,6 @@ extern int putDebugChar (int ch); /* write a single character */ extern int getDebugChar (void); /* read and return a single char */ -/* assign an exception handler */ -extern void exceptionHandler (int, void (*handler) (void)); /************************************************************************/ /* BUFMAX defines the maximum number of characters in inbound/outbound buffers */ @@ -564,7 +571,7 @@ char remcomInBuffer[BUFMAX]; char remcomOutBuffer[BUFMAX]; static short error; -void +static void debug_error ( char *format, char *parm @@ -753,7 +760,6 @@ handle_exception (int exceptionVector) int sigval; int addr, length, reg; char *ptr; - int newPC; gdb_i386vector = exceptionVector; @@ -898,8 +904,6 @@ handle_exception (int exceptionVector) if (hexToInt (&ptr, &addr)) registers[PC] = addr; - newPC = registers[PC]; - /* clear the trace bit */ registers[PS] &= 0xfffffeff; diff --git a/c/src/lib/libbsp/i386/shared/irq/irq.c b/c/src/lib/libbsp/i386/shared/irq/irq.c index 8ff056c9ca..415d0d08d9 100644 --- a/c/src/lib/libbsp/i386/shared/irq/irq.c +++ b/c/src/lib/libbsp/i386/shared/irq/irq.c @@ -1,7 +1,8 @@ -/* irq.c - * +/* * This file contains the implementation of the function described in irq.h - * + */ + +/* * Copyright (c) 2009 embedded brains GmbH * Copyright (C) 1998 valette@crf.canon.fr * diff --git a/c/src/lib/libbsp/i386/shared/irq/irq_asm.S b/c/src/lib/libbsp/i386/shared/irq/irq_asm.S index 40e6626e4b..5ea84e5ea3 100644 --- a/c/src/lib/libbsp/i386/shared/irq/irq_asm.S +++ b/c/src/lib/libbsp/i386/shared/irq/irq_asm.S @@ -1,7 +1,8 @@ -/* irq.c - * +/* * This file contains the implementation of the function described in irq.h - * + */ + +/* * Copyright (C) 1998 valette@crf.canon.fr * * COPYRIGHT (c) 1989-2011. @@ -19,6 +20,8 @@ #include #include +#include /* to establish dependency on prototype */ + #ifndef CPU_STACK_ALIGNMENT #error "Missing header? CPU_STACK_ALIGNMENT is not defined here" #endif diff --git a/c/src/lib/libbsp/i386/shared/pci/pcibios.c b/c/src/lib/libbsp/i386/shared/pci/pcibios.c index b704eab174..7767e7c8a0 100644 --- a/c/src/lib/libbsp/i386/shared/pci/pcibios.c +++ b/c/src/lib/libbsp/i386/shared/pci/pcibios.c @@ -264,24 +264,6 @@ pci_bus_count(void) return ucBusCount; } - -int -BSP_pciFindDevice( unsigned short vendorid, unsigned short deviceid, - int instance, int *pbus, int *pdev, int *pfun ) -{ - int sig, rval; - - rval = pcib_find_by_devid(vendorid, deviceid, instance, &sig); - - if ( PCIB_ERR_SUCCESS == rval ) { - *pbus = PCIB_DEVSIG_BUS(sig); - *pdev = PCIB_DEVSIG_DEV(sig); - *pfun = PCIB_DEVSIG_FUNC(sig); - } - - return rval; -} - /* * Generate Special Cycle */ -- cgit v1.2.3