mirror of
https://git.rtems.org/rtems-libbsd/
synced 2025-07-24 02:12:08 +08:00
Include missing <string.h> and <limits.h>
Fix warnings. Update #2132. Update #2133.
This commit is contained in:
parent
34ff390b09
commit
666a56883a
@ -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
|
||||
|
||||
|
@ -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>
|
||||
|
@ -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();
|
||||
|
@ -33,6 +33,7 @@
|
||||
#include <fcntl.h>
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <rtems.h>
|
||||
#include <rtems/ftpd.h>
|
||||
|
@ -32,6 +32,7 @@
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <rtems/bdbuf.h>
|
||||
#include <rtems/console.h>
|
||||
|
@ -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>
|
||||
|
@ -32,6 +32,7 @@
|
||||
#include <assert.h>
|
||||
#include <fcntl.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <rtems/telnetd.h>
|
||||
#include <rtems/ftpd.h>
|
||||
|
@ -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>
|
||||
|
@ -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
|
||||
|
@ -30,6 +30,7 @@
|
||||
*/
|
||||
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <rtems.h>
|
||||
#include <rtems/shell.h>
|
||||
|
@ -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"
|
||||
|
@ -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;
|
||||
|
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user