From 5039d92c5db14696096bcf0ee92c77cf868c1e4c Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Sun, 12 Oct 2014 14:00:22 -0500 Subject: libcpu/powerpc/ppc403: Fix warnings --- c/src/lib/libcpu/powerpc/ppc403/tty_drv/tty_drv.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'c/src/lib/libcpu/powerpc/ppc403/tty_drv/tty_drv.c') diff --git a/c/src/lib/libcpu/powerpc/ppc403/tty_drv/tty_drv.c b/c/src/lib/libcpu/powerpc/ppc403/tty_drv/tty_drv.c index 0733ddb0ba..1d7b0135bd 100644 --- a/c/src/lib/libcpu/powerpc/ppc403/tty_drv/tty_drv.c +++ b/c/src/lib/libcpu/powerpc/ppc403/tty_drv/tty_drv.c @@ -17,6 +17,7 @@ #include #include "../irq/ictrl.h" #include /* for atexit() */ +#include extern uint32_t bsp_serial_per_sec; extern bool bsp_serial_external_clock; @@ -149,13 +150,14 @@ static const tty0pasync tty0port = (tty0pasync)(0xEF600300 + (TTY0_USE_UART*0x static void *tty0ttyp; /* handle for termios */ -int tty0_round(double x) +static int +tty0_round(double x) { return (int)((int)((x-(int)x)*1000)>500 ? x+1 : x); } -void -tty0BaudSet(uint32_t baudrate) +static void +tty0BaudSet(uint32_t baudrate) { uint32_t tmp; @@ -168,6 +170,7 @@ tty0BaudSet(uint32_t baudrate) tty0port->LCR = tty0port->LCR & ~LCR_DL; } + /* * Hardware-dependent portion of tcsetattr(). */ @@ -176,7 +179,7 @@ tty0SetAttributes (int minor, const struct termios *t) { int baud; - /* FIXME: check c_cflag & CRTSCTS for hardware flowcontrol */ + /* FIXME: check c_cflag & CRTSCTS for hardware flow control */ /* FIXME: check and IMPLEMENT XON/XOFF */ switch (t->c_cflag & CBAUD) { default: baud = -1; break; @@ -323,8 +326,7 @@ static rtems_isr tty0serial_ISR(rtems_vector_number v) * deinit TTY0 * */ -void -tty0DeInit(void) +static void tty0DeInit(void) { /* * disable interrupts for serial tty0port @@ -343,7 +345,7 @@ tty0DeInit(void) * init SPI * */ -rtems_status_code +static rtems_status_code tty0Initialize(void) { register unsigned tmp; @@ -370,6 +372,7 @@ tty0Initialize(void) /* Disable tty0port interrupts while changing hardware */ _ier = tty0port->IER; + (void) _ier; /* avoid set but not used warning */ tty0port->IER = 0; /* set up tty0port control: 8 bit,1 stop,no parity */ @@ -395,6 +398,7 @@ tty0Initialize(void) _tmp = tty0port->LSR; _tmp = tty0port->RBR; _tmp = tty0port->MSR; + (void) _tmp; /* avoid set but not used warning */ /* Enable recive interrupts, don't enable TxInt yet */ tty0port->IER=IER_RCV; -- cgit v1.2.3