diff --git a/include/minix/ipc.h b/include/minix/ipc.h index fc61d6c09..85b84e9c7 100644 --- a/include/minix/ipc.h +++ b/include/minix/ipc.h @@ -39,7 +39,7 @@ typedef struct { u32_t dev; u8_t pages; u8_t flags; -} mess_vmmcp __packed; +} mess_vmmcp; typedef struct { endpoint_t who; @@ -50,9 +50,9 @@ typedef struct { u32_t len; u16_t fd; u16_t clearend_and_flags; /* low 12 bits are clearend, rest flags */ -} mess_vm_vfs_mmap __packed; +} mess_vm_vfs_mmap; -typedef struct { u8_t flags; void *addr; } mess_vmmcp_reply __packed; +typedef struct { u8_t flags; void *addr; } mess_vmmcp_reply; typedef struct { endpoint_t m_source; /* who sent the message */ diff --git a/lib/libc/sys-minix/_ucontext.c b/lib/libc/sys-minix/_ucontext.c index 7d9d11d37..9ce993ce7 100644 --- a/lib/libc/sys-minix/_ucontext.c +++ b/lib/libc/sys-minix/_ucontext.c @@ -2,6 +2,7 @@ #include #include #include +#include #include #include #include @@ -245,6 +246,7 @@ int swapcontext(ucontext_t *oucp, const ucontext_t *ucp) /*===========================================================================* * resumecontext * *===========================================================================*/ +__dead void resumecontext(ucontext_t *ucp) { if (ucp->uc_link == NULL) exit(0); diff --git a/lib/libc/sys-minix/reboot.c b/lib/libc/sys-minix/reboot.c index 393757b3c..806d9dbdd 100644 --- a/lib/libc/sys-minix/reboot.c +++ b/lib/libc/sys-minix/reboot.c @@ -5,6 +5,7 @@ #include #include +#include #include "namespace.h" #include diff --git a/servers/lwip/inet_config.c b/servers/lwip/inet_config.c index b575597ac..b57a70056 100644 --- a/servers/lwip/inet_config.c +++ b/servers/lwip/inet_config.c @@ -45,13 +45,14 @@ int ip_forward_directed_bcast= 0; /* Default is off */ static int ifdefault= -1; /* Default network interface. */ -static void fatal(char *label) +__dead +static void fatal(const char *label) { printf("init: %s: %s\n", label, strerror(errno)); exit(1); } -static void check_mknod(char *device, mode_t mode, int minor) +static void check_mknod(const char *device, mode_t mode, int minor) /* Check if a device exists with the proper device number. */ { dev_t dev; diff --git a/servers/lwip/lwip.c b/servers/lwip/lwip.c index 262af9d12..13f244fae 100644 --- a/servers/lwip/lwip.c +++ b/servers/lwip/lwip.c @@ -34,7 +34,7 @@ extern struct sock_ops sock_udp_ops; extern struct sock_ops sock_tcp_ops; extern struct sock_ops sock_raw_ip_ops; -void sys_init(void) +static void sys_init(void) { } @@ -91,7 +91,7 @@ static int sef_cb_init_fresh(__unused int type, __unused sef_init_info_t *info) set_timer(&tcp_stmr, tcp_sticks, tcp_swatchdog, 0); netif_init(); - netif_lo = netif_find("lo0"); + netif_lo = netif_find((char *) "lo0"); /* Read configuration. */ #if 0 @@ -160,12 +160,15 @@ static void sef_local_startup() static void ds_event(void) { char key[DS_MAX_KEYLEN]; - char *driver_prefix = "drv.net."; + const char *driver_prefix = "drv.net."; char *label; u32_t value; int type; endpoint_t owner_endpoint; int r; + int prefix_len; + + prefix_len = strlen(driver_prefix); /* We may get one notification for multiple updates from DS. Get events * and owners from DS, until DS tells us that there are no more. @@ -178,9 +181,10 @@ static void ds_event(void) } /* Only check for network driver up events. */ - if(strncmp(key, driver_prefix, sizeof(driver_prefix)) - || value != DS_DRIVER_UP) + if(strncmp(key, driver_prefix, prefix_len) + || value != DS_DRIVER_UP) { return; + } /* The driver label comes after the prefix. */ label = key + strlen(driver_prefix); diff --git a/servers/pm/getset.c b/servers/pm/getset.c index 9084b4e76..4e7f757c1 100644 --- a/servers/pm/getset.c +++ b/servers/pm/getset.c @@ -23,7 +23,7 @@ int do_get() */ register struct mproc *rmp = mp; - int r, i; + int r; int ngroups; switch(call_nr) {