summaryrefslogtreecommitdiffstats
path: root/testsuites/libtests/termios
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@oarcorp.com>2012-05-11 12:20:47 -0500
committerJoel Sherrill <joel.sherrill@oarcorp.com>2012-05-11 12:20:47 -0500
commit4c86e3d8bee2680c9be999b4627b19438f1ae728 (patch)
treee98cb2c409079e5507a1ddf9f5764781697f1b71 /testsuites/libtests/termios
parenttmoverhd - Eliminate warnings (diff)
downloadrtems-4c86e3d8bee2680c9be999b4627b19438f1ae728.tar.bz2
libtmtests - Eliminate missing prototype warnings
Diffstat (limited to '')
-rw-r--r--testsuites/libtests/termios/init.c51
-rw-r--r--testsuites/libtests/termios01/termios_testdriver.c29
-rw-r--r--testsuites/libtests/termios02/init.c5
-rw-r--r--testsuites/libtests/termios03/init.c10
-rw-r--r--testsuites/libtests/termios03/termios_testdriver_polled.c23
-rw-r--r--testsuites/libtests/termios04/init.c10
-rw-r--r--testsuites/libtests/termios04/termios_testdriver_intr.c34
-rw-r--r--testsuites/libtests/termios05/init.c10
-rw-r--r--testsuites/libtests/termios06/init.c15
-rw-r--r--testsuites/libtests/termios06/test_pppd.c5
-rw-r--r--testsuites/libtests/termios07/init.c10
-rw-r--r--testsuites/libtests/termios08/init.c15
12 files changed, 180 insertions, 37 deletions
diff --git a/testsuites/libtests/termios/init.c b/testsuites/libtests/termios/init.c
index 9bd00d9348..e425756f23 100644
--- a/testsuites/libtests/termios/init.c
+++ b/testsuites/libtests/termios/init.c
@@ -26,21 +26,6 @@
#include <bsp.h>
-
-#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
-#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
-
-#define CONFIGURE_MAXIMUM_TASKS 1
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-
-#define CONFIGURE_MICROSECONDS_PER_TICK 1000
-
-#define CONFIGURE_INIT
-
-rtems_task Init (rtems_task_argument argument);
-
-#include <rtems/confdefs.h>
#include <rtems/shell.h>
#include <stdio.h>
@@ -51,6 +36,24 @@ rtems_task Init (rtems_task_argument argument);
#include <tmacros.h>
+/* forward declarations to avoid warnings */
+rtems_task Init(rtems_task_argument argument);
+void print_32bits(unsigned long bits, unsigned char size, char * names[]);
+void print_c_iflag(struct termios * tp);
+void print_c_oflag(struct termios * tp);
+void print_c_lflag(struct termios * tp);
+void print_c_cflag(struct termios * tp);
+void print_c_cc(struct termios * tp);
+void print_termios(struct termios *tp);
+unsigned long get_baud_rate(void);
+unsigned long get_parity(void);
+unsigned long get_stop_bits(void);
+unsigned long get_data_bits(void);
+void change_line_settings(struct termios *tp);
+void canonical_input(struct termios *tp);
+void do_raw_input(int vmin, int vtime);
+void usage(void);
+
#if !defined(fileno)
int fileno( FILE *stream); /* beyond ANSI */
#endif
@@ -438,7 +441,7 @@ void print_termios( struct termios *tp )
}
-unsigned long get_baud_rate( void )
+unsigned long get_baud_rate(void)
{
unsigned long baud_rate;
@@ -795,3 +798,19 @@ Init (rtems_task_argument ignored)
rtems_test_exit( 0 );
}
}
+
+/* application configuration */
+#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
+#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
+
+#define CONFIGURE_MAXIMUM_TASKS 1
+
+#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
+
+#define CONFIGURE_MICROSECONDS_PER_TICK 1000
+
+#define CONFIGURE_INIT
+
+#include <rtems/confdefs.h>
+/* end of configuration */
+
diff --git a/testsuites/libtests/termios01/termios_testdriver.c b/testsuites/libtests/termios01/termios_testdriver.c
index bf874f3b2b..70e0d491af 100644
--- a/testsuites/libtests/termios01/termios_testdriver.c
+++ b/testsuites/libtests/termios01/termios_testdriver.c
@@ -1,7 +1,11 @@
-/*
- * This file contains a test fixture termios device driver
+/**
+ * @file
*
- * COPYRIGHT (c) 1989-2009.
+ * This file contains a test fixture termios device driver.
+ */
+
+/*
+ * COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -21,6 +25,19 @@
#include <rtems/libcsupport.h>
#include "termios_testdriver.h"
+/* forward declarations to avoid warnings */
+int termios_test_driver_inbyte_nonblocking(int port);
+void termios_test_driver_outbyte_polled(int port, char ch);
+ssize_t termios_test_driver_write_support(
+ int minor,
+ const char *buf,
+ size_t len
+);
+int termios_test_driver_set_attributes(
+ int minor,
+ const struct termios *t
+);
+
int termios_test_driver_inbyte_nonblocking( int port )
{
return -1;
@@ -33,7 +50,11 @@ void termios_test_driver_outbyte_polled(
{
}
-ssize_t termios_test_driver_write_support (int minor, const char *buf, size_t len)
+ssize_t termios_test_driver_write_support(
+ int minor,
+ const char *buf,
+ size_t len
+)
{
size_t nwrite = 0;
diff --git a/testsuites/libtests/termios02/init.c b/testsuites/libtests/termios02/init.c
index 87c6ba3f9b..7659314960 100644
--- a/testsuites/libtests/termios02/init.c
+++ b/testsuites/libtests/termios02/init.c
@@ -1,5 +1,5 @@
/*
- * COPYRIGHT (c) 1989-2010.
+ * COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -16,6 +16,9 @@
#include <errno.h>
#include <unistd.h>
+/* forward declarations to avoid warnings */
+rtems_task Init(rtems_task_argument argument);
+
rtems_task Init(
rtems_task_argument ignored
)
diff --git a/testsuites/libtests/termios03/init.c b/testsuites/libtests/termios03/init.c
index 0b77e4f985..bc33feb42e 100644
--- a/testsuites/libtests/termios03/init.c
+++ b/testsuites/libtests/termios03/init.c
@@ -1,5 +1,5 @@
/*
- * COPYRIGHT (c) 1989-2010.
+ * COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -22,6 +22,14 @@
#include <termios.h>
#include <rtems/dumpbuf.h>
+/* forward declarations to avoid warnings */
+rtems_task Init(rtems_task_argument argument);
+void write_helper(int fd, const char *c);
+void read_helper(int fd, const char *expected);
+void open_it(void);
+void close_it(void);
+void change_iflag(const char *desc, int mask, int new);
+
void write_helper(
int fd,
const char *c
diff --git a/testsuites/libtests/termios03/termios_testdriver_polled.c b/testsuites/libtests/termios03/termios_testdriver_polled.c
index 88807de06f..6c197fff2a 100644
--- a/testsuites/libtests/termios03/termios_testdriver_polled.c
+++ b/testsuites/libtests/termios03/termios_testdriver_polled.c
@@ -1,7 +1,11 @@
-/*
- * This file contains a test fixture termios device driver
+/**
+ * @file
*
- * COPYRIGHT (c) 1989-2011.
+ * This file contains a test fixture termios device driver
+ */
+
+/*
+ * COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -21,6 +25,19 @@
#include <rtems/dumpbuf.h>
#include "termios_testdriver_polled.h"
+/* forward declarations to avoid warnings */
+int termios_test_driver_inbyte_nonblocking(int port);
+void termios_test_driver_outbyte_polled(int port, char ch);
+ssize_t termios_test_driver_write_support(
+ int minor,
+ const char *buf,
+ size_t len
+);
+int termios_test_driver_set_attributes(
+ int minor,
+ const struct termios *t
+);
+
#define TX_MAX 1024
uint8_t Tx_Buffer[TX_MAX];
int Tx_Index = 0;
diff --git a/testsuites/libtests/termios04/init.c b/testsuites/libtests/termios04/init.c
index 49e128d079..1755f64233 100644
--- a/testsuites/libtests/termios04/init.c
+++ b/testsuites/libtests/termios04/init.c
@@ -1,5 +1,5 @@
/*
- * COPYRIGHT (c) 1989-2010.
+ * COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -22,6 +22,14 @@
#include <termios.h>
#include <rtems/dumpbuf.h>
+/* forward declarations to avoid warnings */
+void write_helper(int fd, const char *c);
+void read_helper(int fd, const char *expected);
+void open_it(void);
+void close_it(void);
+void change_iflag(const char *desc, int mask, int new);
+rtems_task Init(rtems_task_argument argument);
+
void write_helper(
int fd,
const char *c
diff --git a/testsuites/libtests/termios04/termios_testdriver_intr.c b/testsuites/libtests/termios04/termios_testdriver_intr.c
index 53a2b7899b..086bbb3a12 100644
--- a/testsuites/libtests/termios04/termios_testdriver_intr.c
+++ b/testsuites/libtests/termios04/termios_testdriver_intr.c
@@ -1,7 +1,11 @@
-/*
- * This file contains a test fixture termios device driver
+/**
+ * @file
*
- * COPYRIGHT (c) 1989-2011.
+ * This file contains a test fixture termios device driver
+ */
+
+/*
+ * COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -21,6 +25,30 @@
#include <rtems/dumpbuf.h>
#include "termios_testdriver_intr.h"
+/* forward declarations to avoid warnings */
+void termios_test_driver_wait_for_tx_to_complete(void);
+rtems_timer_service_routine Rx_ISR(
+ rtems_id ignored_id,
+ void *ignored_address
+);
+rtems_timer_service_routine Tx_ISR(
+ rtems_id ignored_id,
+ void *ignored_address
+);
+ssize_t termios_test_driver_write_helper(
+ int port,
+ const char *buf,
+ size_t len
+);
+int termios_test_driver_set_attributes(
+ int minor,
+ const struct termios *t
+);
+#if defined(TASK_DRIVEN)
+ int termios_test_driver_inbyte_nonblocking(int port);
+#endif
+
+/* global variables */
rtems_id Rx_Timer;
rtems_id Tx_Timer;
diff --git a/testsuites/libtests/termios05/init.c b/testsuites/libtests/termios05/init.c
index 506cf5fc46..4dec03805f 100644
--- a/testsuites/libtests/termios05/init.c
+++ b/testsuites/libtests/termios05/init.c
@@ -1,5 +1,5 @@
/*
- * COPYRIGHT (c) 1989-2010.
+ * COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -22,6 +22,14 @@
#include <termios.h>
#include <rtems/dumpbuf.h>
+/* forward declarations to avoid warnings */
+rtems_task Init(rtems_task_argument argument);
+void write_helper(int fd, const char *c);
+void read_helper(int fd, const char *expected);
+void open_it(void);
+void close_it(void);
+void change_iflag(const char *desc, int mask, int new);
+
void write_helper(
int fd,
const char *c
diff --git a/testsuites/libtests/termios06/init.c b/testsuites/libtests/termios06/init.c
index 23c08a6629..204689e70b 100644
--- a/testsuites/libtests/termios06/init.c
+++ b/testsuites/libtests/termios06/init.c
@@ -1,5 +1,5 @@
/*
- * COPYRIGHT (c) 1989-2010.
+ * COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -23,6 +23,19 @@
#include <rtems/dumpbuf.h>
#include <rtems/termiostypes.h>
+/* forward declarations to avoid warnings */
+rtems_task Init(rtems_task_argument argument);
+void open_it(void);
+void Rx_Wake(struct termios *tty, void *arg);
+void Tx_Wake(struct termios *tty, void *arg);
+void set_wakeups(void);
+void set_discipline(void);
+void ioctl_it(void);
+void close_it(void);
+void write_it(void);
+void read_helper(int fd, const char *expected);
+void read_it(void);
+
void pppasyncattach(void);
void ppp_test_driver_set_rx( const char *expected, size_t len );
diff --git a/testsuites/libtests/termios06/test_pppd.c b/testsuites/libtests/termios06/test_pppd.c
index addbc73f43..39e46755e7 100644
--- a/testsuites/libtests/termios06/test_pppd.c
+++ b/testsuites/libtests/termios06/test_pppd.c
@@ -1,5 +1,5 @@
/*
- * COPYRIGHT (c) 1989-2010.
+ * COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -16,6 +16,9 @@
#include <rtems/termiostypes.h>
#include <rtems/dumpbuf.h>
+/* forward declarations to avoid warnings */
+void ppp_test_driver_set_rx(const char *expected, size_t len);
+void pppasyncattach(void);
int pppopen(struct rtems_termios_tty *tty);
int pppclose(struct rtems_termios_tty *tty);
int pppread(struct rtems_termios_tty *tty, rtems_libio_rw_args_t *rw_args);
diff --git a/testsuites/libtests/termios07/init.c b/testsuites/libtests/termios07/init.c
index 7f873be4b2..5514ee98c9 100644
--- a/testsuites/libtests/termios07/init.c
+++ b/testsuites/libtests/termios07/init.c
@@ -1,5 +1,5 @@
/*
- * COPYRIGHT (c) 1989-2010.
+ * COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -23,6 +23,14 @@
#include <rtems/dumpbuf.h>
#include <rtems/libio.h>
+/* forward declarations to avoid warnings */
+rtems_task Init(rtems_task_argument argument);
+void write_helper(int fd, const char *c);
+void read_helper(int fd, const char *expected);
+void open_it(void);
+void close_it(void);
+void change_iflag(const char *desc, int mask, int new);
+
void write_helper(
int fd,
const char *c
diff --git a/testsuites/libtests/termios08/init.c b/testsuites/libtests/termios08/init.c
index 08745cec0f..b3471a330f 100644
--- a/testsuites/libtests/termios08/init.c
+++ b/testsuites/libtests/termios08/init.c
@@ -1,5 +1,5 @@
/*
- * COPYRIGHT (c) 1989-2010.
+ * COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -23,6 +23,15 @@
#include <rtems/dumpbuf.h>
#include <rtems/termiostypes.h>
+/* forward declarations to avoid warnings */
+rtems_task Init(rtems_task_argument argument);
+void open_it(void);
+void close_it(void);
+void write_it(void);
+void change_lflag( const char *desc, int mask, int new );
+void change_vmin_vtime( const char *desc, int min, int time );
+void read_it(ssize_t expected);
+
int Test_fd;
void open_it(void)
@@ -86,9 +95,7 @@ void change_vmin_vtime( const char *desc, int min, int time )
rtems_test_assert( rc == 0 );
}
-void read_it(
- ssize_t expected
-)
+void read_it( ssize_t expected )
{
ssize_t rc;
char buf[32];