summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2017-08-25 14:23:18 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2017-08-25 14:23:50 +0200
commit666a56883ad2ae7757689f28cee2b9b80582bcd6 (patch)
treeabba696a18f5f084997a5acf5779d1b0ede57ee8
parentBUS_SPACE(9): 64-bit support (diff)
downloadrtems-libbsd-666a56883ad2ae7757689f28cee2b9b80582bcd6.tar.bz2
Include missing <string.h> and <limits.h>
Fix warnings. Update #2132. Update #2133.
-rw-r--r--freebsd/sys/sys/systm.h3
-rw-r--r--rtemsbsd/rtems/rtems-kernel-init.c2
-rw-r--r--testsuite/evdev01/init.c19
-rw-r--r--testsuite/ftpd02/test_main.c1
-rw-r--r--testsuite/media01/test_main.c1
-rw-r--r--testsuite/pf01/test_main.c1
-rw-r--r--testsuite/pf02/test_main.c1
-rw-r--r--testsuite/program01/test_main.c1
-rwxr-xr-xtestsuite/selectpollkqueue01/test_main.c1
-rw-r--r--testsuite/telnetd01/test_main.c1
-rw-r--r--testsuite/termios/test_termios_driver.c3
-rw-r--r--testsuite/termios01/test_main.c6
-rw-r--r--testsuite/usbserial01/init.c15
13 files changed, 34 insertions, 21 deletions
diff --git a/freebsd/sys/sys/systm.h b/freebsd/sys/sys/systm.h
index ee799320..90c11bb1 100644
--- a/freebsd/sys/sys/systm.h
+++ b/freebsd/sys/sys/systm.h
@@ -44,6 +44,9 @@
#include <sys/cdefs.h>
#include <sys/queue.h>
#include <sys/stdint.h> /* for people using printf mainly */
+#ifdef __rtems__
+#include <string.h>
+#endif /* __rtems__ */
__NULLABILITY_PRAGMA_PUSH
diff --git a/rtemsbsd/rtems/rtems-kernel-init.c b/rtemsbsd/rtems/rtems-kernel-init.c
index 4138bc17..8432d5db 100644
--- a/rtemsbsd/rtems/rtems-kernel-init.c
+++ b/rtemsbsd/rtems/rtems-kernel-init.c
@@ -51,6 +51,8 @@
#include <sys/stat.h>
#include <sys/kbio.h>
+#include <limits.h>
+
#include <dev/kbd/kbdreg.h>
#include <net80211/ieee80211_freebsd.h>
diff --git a/testsuite/evdev01/init.c b/testsuite/evdev01/init.c
index fa16e618..935596aa 100644
--- a/testsuite/evdev01/init.c
+++ b/testsuite/evdev01/init.c
@@ -28,6 +28,7 @@
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
#include <errno.h>
#include <sys/stat.h>
#include <dev/evdev/input.h>
@@ -293,7 +294,7 @@ check_device_type(char* device)
return ret;
}
-static int
+static void
scan_for_devices(void)
{
int device_count;
@@ -318,7 +319,7 @@ evdev_scan_task(rtems_task_argument arg)
{
rtems_status_code sc;
struct evdev_test_message msg;
- uint32_t size;
+ size_t size;
otask_active = true;
kill_otask = false;
@@ -350,7 +351,7 @@ evdev_keyboard_task(rtems_task_argument arg)
struct input_event buffer[32];
rtems_status_code sc;
struct evdev_test_message msg;
- uint32_t size;
+ size_t size;
ktask_active = true;
kill_ktask = false;
@@ -433,7 +434,7 @@ evdev_mouse_task(rtems_task_argument arg)
struct input_event buffer[32];
rtems_status_code sc;
struct evdev_test_message msg;
- uint32_t size;
+ size_t size;
mtask_active = true;
kill_mtask = false;
@@ -510,7 +511,7 @@ evdev_touch_task(rtems_task_argument arg)
struct input_event buffer[32];
rtems_status_code sc;
struct evdev_test_message msg;
- uint32_t size;
+ size_t size;
ttask_active = true;
kill_ttask = false;
@@ -648,16 +649,16 @@ Init(rtems_task_argument arg)
);
assert(sc == RTEMS_SUCCESSFUL);
- sc = rtems_task_start(oid, evdev_scan_task, NULL);
+ sc = rtems_task_start(oid, evdev_scan_task, 0);
assert(sc == RTEMS_SUCCESSFUL);
- sc = rtems_task_start(kid, evdev_keyboard_task, NULL);
+ sc = rtems_task_start(kid, evdev_keyboard_task, 0);
assert(sc == RTEMS_SUCCESSFUL);
- sc = rtems_task_start(mid, evdev_mouse_task, NULL);
+ sc = rtems_task_start(mid, evdev_mouse_task, 0);
assert(sc == RTEMS_SUCCESSFUL);
- sc = rtems_task_start(tid, evdev_touch_task, NULL);
+ sc = rtems_task_start(tid, evdev_touch_task, 0);
assert(sc == RTEMS_SUCCESSFUL);
sc = rtems_bsd_initialize();
diff --git a/testsuite/ftpd02/test_main.c b/testsuite/ftpd02/test_main.c
index 457192b4..3eb079d2 100644
--- a/testsuite/ftpd02/test_main.c
+++ b/testsuite/ftpd02/test_main.c
@@ -33,6 +33,7 @@
#include <fcntl.h>
#include <assert.h>
#include <stdlib.h>
+#include <string.h>
#include <rtems.h>
#include <rtems/ftpd.h>
diff --git a/testsuite/media01/test_main.c b/testsuite/media01/test_main.c
index df4cf21c..b808ad60 100644
--- a/testsuite/media01/test_main.c
+++ b/testsuite/media01/test_main.c
@@ -32,6 +32,7 @@
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
#include <rtems/bdbuf.h>
#include <rtems/console.h>
diff --git a/testsuite/pf01/test_main.c b/testsuite/pf01/test_main.c
index 51c88392..9421f0e6 100644
--- a/testsuite/pf01/test_main.c
+++ b/testsuite/pf01/test_main.c
@@ -33,6 +33,7 @@
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
#include <sys/stat.h>
#include <sys/socket.h>
#include <netinet/in.h>
diff --git a/testsuite/pf02/test_main.c b/testsuite/pf02/test_main.c
index e81d2046..98c512b1 100644
--- a/testsuite/pf02/test_main.c
+++ b/testsuite/pf02/test_main.c
@@ -32,6 +32,7 @@
#include <assert.h>
#include <fcntl.h>
#include <stdlib.h>
+#include <string.h>
#include <rtems/telnetd.h>
#include <rtems/ftpd.h>
diff --git a/testsuite/program01/test_main.c b/testsuite/program01/test_main.c
index a670afeb..ac726272 100644
--- a/testsuite/program01/test_main.c
+++ b/testsuite/program01/test_main.c
@@ -33,6 +33,7 @@
#include <assert.h>
#include <errno.h>
#include <stdlib.h>
+#include <string.h>
#include <unistd.h>
#include <syslog.h>
#include <sys/socket.h>
diff --git a/testsuite/selectpollkqueue01/test_main.c b/testsuite/selectpollkqueue01/test_main.c
index 8af59bf9..6473c6c5 100755
--- a/testsuite/selectpollkqueue01/test_main.c
+++ b/testsuite/selectpollkqueue01/test_main.c
@@ -1149,7 +1149,6 @@ static void
test_pipe_close(test_context *ctx)
{
int rfd = ctx->pfd[0];
- int wfd = ctx->pfd[1];
struct pollfd pfd = {
.fd = rfd,
.events = POLLIN
diff --git a/testsuite/telnetd01/test_main.c b/testsuite/telnetd01/test_main.c
index c85a8964..489f2440 100644
--- a/testsuite/telnetd01/test_main.c
+++ b/testsuite/telnetd01/test_main.c
@@ -30,6 +30,7 @@
*/
#include <assert.h>
+#include <string.h>
#include <rtems.h>
#include <rtems/shell.h>
diff --git a/testsuite/termios/test_termios_driver.c b/testsuite/termios/test_termios_driver.c
index 35637b99..1e57a01b 100644
--- a/testsuite/termios/test_termios_driver.c
+++ b/testsuite/termios/test_termios_driver.c
@@ -13,6 +13,7 @@
#include <sys/tty.h>
#include <sys/serial.h>
#include <assert.h>
+#include <string.h>
#include <rtems/seterr.h>
#include "../termios/test_termios_driver.h"
@@ -133,4 +134,4 @@ test_termios_make_dev(void)
tty_makedev( tp, NULL, "%s", TERMIOS_TEST_DRIVER_TTY_PREFIX TERMIOS_TEST_DRIVER_TTY_UNIT);
assert(tp != NULL);
-} \ No newline at end of file
+}
diff --git a/testsuite/termios01/test_main.c b/testsuite/termios01/test_main.c
index 0ed991d1..e00ff865 100644
--- a/testsuite/termios01/test_main.c
+++ b/testsuite/termios01/test_main.c
@@ -10,8 +10,10 @@
#define TTYDEFCHARS
#include <sys/ttydefaults.h>
#include <assert.h>
+#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
#include <errno.h>
#include <fcntl.h>
#include <inttypes.h>
@@ -576,8 +578,6 @@ static void
test_main(void)
{
int rc;
- rtems_status_code sc;
- rtems_device_major_number registered;
int test;
struct termios t;
int index = 0;
@@ -687,4 +687,4 @@ test_main(void)
exit(0);
}
-#include <rtems/bsd/test/default-termios-init.h> \ No newline at end of file
+#include <rtems/bsd/test/default-termios-init.h>
diff --git a/testsuite/usbserial01/init.c b/testsuite/usbserial01/init.c
index eee027fc..4e2209fa 100644
--- a/testsuite/usbserial01/init.c
+++ b/testsuite/usbserial01/init.c
@@ -28,6 +28,7 @@
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
#include <errno.h>
#include <fcntl.h>
@@ -56,7 +57,8 @@ static void
usb_serial_read_task(rtems_task_argument arg)
{
struct usb_test_message msg;
- uint32_t size, end_time;
+ size_t size;
+ uint32_t end_time;
int bytes, index;
rtask_active = true;
@@ -90,7 +92,7 @@ static void
usb_serial_write_task(rtems_task_argument arg)
{
struct usb_test_message msg;
- uint32_t size;
+ size_t size;
int bytes, write_len, count = 0;
wtask_active = true;
@@ -121,7 +123,7 @@ usb_serial_open_task(rtems_task_argument arg)
rtems_status_code sc;
struct usb_test_message msg;
struct termios t;
- uint32_t size;
+ size_t size;
int fd, iret;
fd = -2;
@@ -173,7 +175,6 @@ Init(rtems_task_argument arg)
{
rtems_status_code sc;
struct usb_test_message msg;
- int ii;
(void) arg;
puts("*** " TEST_NAME " TEST ***");
@@ -235,13 +236,13 @@ Init(rtems_task_argument arg)
);
assert(sc == RTEMS_SUCCESSFUL);
- sc = rtems_task_start(rid, usb_serial_read_task, NULL);
+ sc = rtems_task_start(rid, usb_serial_read_task, 0);
assert(sc == RTEMS_SUCCESSFUL);
- sc = rtems_task_start(oid, usb_serial_open_task, NULL);
+ sc = rtems_task_start(oid, usb_serial_open_task, 0);
assert(sc == RTEMS_SUCCESSFUL);
- sc = rtems_task_start(wid, usb_serial_write_task, NULL);
+ sc = rtems_task_start(wid, usb_serial_write_task, 0);
assert(sc == RTEMS_SUCCESSFUL);
sc = rtems_bsd_initialize();