summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/i386/shared
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@oarcorp.com>2014-10-12 08:31:32 -0500
committerJoel Sherrill <joel.sherrill@oarcorp.com>2014-10-13 10:33:17 -0500
commit888fadaf53b3ad8f575a5e61a475660ae8ba79aa (patch)
tree8bfaf5ff07a24f08563ca9710ee30698c951385e /c/src/lib/libbsp/i386/shared
parentsparc/leon2: Fix warnings (diff)
downloadrtems-888fadaf53b3ad8f575a5e61a475660ae8ba79aa.tar.bz2
i386/pc386: Clean up and fix warnings
Diffstat (limited to 'c/src/lib/libbsp/i386/shared')
-rw-r--r--c/src/lib/libbsp/i386/shared/comm/i386-stub.c6
-rw-r--r--c/src/lib/libbsp/i386/shared/comm/uart.c20
-rw-r--r--c/src/lib/libbsp/i386/shared/irq/irq_init.c4
3 files changed, 16 insertions, 14 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 8113d7ed2c..20e35929bf 100644
--- a/c/src/lib/libbsp/i386/shared/comm/i386-stub.c
+++ b/c/src/lib/libbsp/i386/shared/comm/i386-stub.c
@@ -465,7 +465,7 @@ hex (char ch)
}
/* scan for the sequence $<data>#<checksum> */
-void
+static void
getpacket (char *buffer)
{
unsigned char checksum;
@@ -529,7 +529,7 @@ getpacket (char *buffer)
/* send the packet in buffer. */
-void
+static void
putpacket (char *buffer)
{
unsigned char checksum;
@@ -631,7 +631,7 @@ mem2hex (char *mem, char *buf, int count, int may_fault)
/* convert the hex array pointed to by buf into binary to be placed in mem */
/* return a pointer to the character AFTER the last byte written */
-char *
+static char *
hex2mem (char *buf, char *mem, int count, int may_fault)
{
int i;
diff --git a/c/src/lib/libbsp/i386/shared/comm/uart.c b/c/src/lib/libbsp/i386/shared/comm/uart.c
index 72c7f36383..6946492f20 100644
--- a/c/src/lib/libbsp/i386/shared/comm/uart.c
+++ b/c/src/lib/libbsp/i386/shared/comm/uart.c
@@ -60,15 +60,17 @@ uwrite(int uart, int reg, unsigned int val)
}
}
-#ifdef UARTDEBUG
- static void
+static void
uartError(int uart)
{
unsigned char uartStatus, dummy;
uartStatus = uread(uart, LSR);
+ (void) uartStatus; /* avoid set but not used warning */
dummy = uread(uart, RBR);
+ (void) dummy; /* avoid set but not used warning */
+#ifdef UARTDEBUG
if (uartStatus & OE)
printk("********* Over run Error **********\n");
if (uartStatus & PE)
@@ -79,15 +81,8 @@ uartError(int uart)
printk("********* Parity Error **********\n");
if (uartStatus & ERFIFO)
printk("********* Error receive Fifo **********\n");
-
-}
-#else
-inline void uartError(int uart)
-{
- uread(uart, LSR);
- uread(uart, RBR);
-}
#endif
+}
/*
* Uart initialization, it is hardcoded to 8 bit, no parity,
@@ -455,7 +450,10 @@ static void ( *driver_input_handler_com2 )( void *, char *, int ) = 0;
* This routine sets the handler to handle the characters received
* from the serial port.
*/
-void uart_set_driver_handler( int port, void ( *handler )( void *, char *, int ) )
+static void uart_set_driver_handler(
+ int port,
+ void ( *handler )( void *, char *, int )
+)
{
switch( port )
{
diff --git a/c/src/lib/libbsp/i386/shared/irq/irq_init.c b/c/src/lib/libbsp/i386/shared/irq/irq_init.c
index 628a366575..9bf9bc5108 100644
--- a/c/src/lib/libbsp/i386/shared/irq/irq_init.c
+++ b/c/src/lib/libbsp/i386/shared/irq/irq_init.c
@@ -98,6 +98,10 @@ static interrupt_gate_descriptor idtEntry;
static rtems_raw_irq_global_settings raw_initial_config;
+
+/*
+ * This method is called from irq_asm.S and cannot be static.
+ */
void raw_idt_notify(void)
{
printk("raw_idt_notify has been called \n");