]> Zhao Yanbai Git Server - minix.git/commitdiff
Cleanup servers to make GCC/Clang a little happier
authorThomas Veerman <thomas@minix3.org>
Thu, 8 Sep 2011 13:57:03 +0000 (13:57 +0000)
committerThomas Veerman <thomas@minix3.org>
Thu, 8 Sep 2011 13:57:03 +0000 (13:57 +0000)
28 files changed:
lib/liblwip/include/arch/cc.h
nbsd_include/unistd.h
servers/apfs/dev_uds.c
servers/avfs/Makefile
servers/avfs/mount.c
servers/devman/bind.c
servers/ext2/cache.c
servers/ext2/inode.c
servers/inet/generic/tcp.c
servers/inet/generic/tcp_lib.c
servers/inet/generic/tcp_recv.c
servers/init/init.c
servers/is/dmp_kernel.c
servers/is/dmp_vm.c
servers/iso9660fs/cache.c
servers/lwip/Makefile
servers/lwip/driver.c
servers/lwip/inet_config.h
servers/lwip/raw_ip.c
servers/lwip/socket.c
servers/lwip/tcp.c
servers/lwip/udp.c
servers/rs/main.c
servers/rs/manager.c
servers/vfs/misc.c
servers/vfs/select.c
servers/vm/mmap.c
servers/vm/queryexit.c

index 6109ee23c59594687214b1a8e5603c94fad2a10d..f21655c1e6b31772368855f0595982eaf05ed097 100644 (file)
@@ -7,8 +7,6 @@
 #include <errno.h>
 #include <assert.h>
 
-#define BYTE_ORDER LITTLE_ENDIAN
-
 typedef i8_t s8_t;
 typedef i16_t s16_t;
 typedef i32_t s32_t;
index 986c0b909dff43505e954f908a73d699063ba7a2..c7621e8ec74bfa12b93db0a636c6fa6549598658 100644 (file)
@@ -311,9 +311,26 @@ ssize_t     pwrite(int, const void *, size_t, off_t);
 /*
  * Implementation-defined extensions
  */
-#if defined(__minix)
+#ifdef __minix
 int lseek64(int fd, u64_t _offset, int _whence, u64_t *_newpos);
-#endif /* !__minix */
+#if defined(_MINIX)
+#include <minix/type.h>
+
+int getsigset(sigset_t *sigset);
+int getprocnr(void);
+int getnprocnr(pid_t pid);
+int getpprocnr(void);
+int _pm_findproc(char *proc_name, int *proc_nr);
+int mapdriver(char *label, int major, int style, int flags);
+int adddma(endpoint_t proc_e, phys_bytes start, phys_bytes size);
+int deldma(endpoint_t proc_e, phys_bytes start, phys_bytes size);
+int getdma(endpoint_t *procp, phys_bytes *basep, phys_bytes *sizep);
+pid_t getnpid(endpoint_t proc_ep);
+uid_t getnuid(endpoint_t proc_ep);
+gid_t getngid(endpoint_t proc_ep);
+int getnucred(endpoint_t proc_ep, struct ucred *ucred);
+#endif /* __MINIX */
+#endif /* __minix */
 
 #if defined(_NETBSD_SOURCE)
 #ifndef __minix
index 05b3adf25048ff1f5cb21920aac024b9ec224fea..7250f071e5f48e9517d96675677b030d3e159685 100644 (file)
@@ -962,7 +962,7 @@ PUBLIC int uds_ioctl(message *dev_m_in, message *dev_m_out)
 
 PUBLIC int uds_unsuspend(endpoint_t m_source, int minor)
 {
-       int r, bytes;
+       int r = OK, bytes;
        message m_out;
        uds_fd_t *fdp;
 
@@ -976,7 +976,6 @@ PUBLIC int uds_unsuspend(endpoint_t m_source, int minor)
 
                /* prepare the response */
                uds_sel_reply(&m_out, DEV_SEL_REPL2, minor, fdp->sel_ops_out);
-               r = OK;
        } else if (fdp->ready_to_revive == 1) {
 
                /* clear the ready to revive flag */
@@ -999,7 +998,6 @@ PUBLIC int uds_unsuspend(endpoint_t m_source, int minor)
                                uds_set_reply(&m_out, DEV_REVIVE, fdp->endpoint,
                                              fdp->io_gr, bytes);
 
-                               r = OK;
                                break;
 
                        case UDS_SUSPENDED_WRITE:
@@ -1017,7 +1015,6 @@ PUBLIC int uds_unsuspend(endpoint_t m_source, int minor)
                                uds_set_reply(&m_out, DEV_REVIVE, fdp->endpoint,
                                              fdp->io_gr, bytes);
 
-                               r = OK;
                                break;
 
                        case UDS_SUSPENDED_CONNECT:
@@ -1035,7 +1032,6 @@ PUBLIC int uds_unsuspend(endpoint_t m_source, int minor)
                                uds_set_reply(&m_out, DEV_REVIVE, fdp->endpoint,
                                              fdp->io_gr, OK);
 
-                               r = OK;
                                break;
 
                        default:
index 1fc72128e12ab63b124f3d4c91ca4a7027584707..3dad05917f243a19276544c8eecd9d9e974c2e62 100644 (file)
@@ -17,6 +17,10 @@ CPPFLAGS+= -DUSE_COVERAGE
 DPADD+=        ${LIBSYS} ${LIBTIMERS} ${LIBEXEC}
 LDADD+=        -lsys -ltimers -lexec -lmthread
 
+.if ${COMPILER_TYPE} == "gnu"
+LDADD+=        -lc
+.endif
+
 MAN=
 
 BINDIR?= /usr/sbin
index 05e4ff0b2a79ea40151bcf7fe27701191bbd16cc..a0096e6a81a3bbe93bdf9346b33ad149da3fcb18 100644 (file)
@@ -170,7 +170,7 @@ char mount_label[LABEL_MAX] )
   int i, r = OK, found, isroot, mount_root, con_reqs;
   struct fproc *tfp;
   struct dmap *dp;
-  struct vnode *root_node, *vp = NULL, *bspec;
+  struct vnode *root_node, *vp = NULL;
   struct vmnt *new_vmp, *parent_vmp;
   char *label;
   struct node_details res;
index c81baf82821efd704839fa7bc49069f0698c202c..9815552e5fa5d956b1616caa7cdc98754767e4c5 100644 (file)
@@ -36,7 +36,7 @@ PUBLIC int do_bind_device(message *m)
                                m->DEVMAN_RESULT= res;
                        } else if (m->DEVMAN_RESULT != OK) {
                                printf("[W] devman.do_bind_device(): driver could"
-                                      " not bind device (%d)\n", m->DEVMAN_RESULT);
+                                      " not bind device (%ld)\n", m->DEVMAN_RESULT);
                        } else {
                                dev->state = DEVMAN_DEVICE_BOUND;
                                devman_get_device(dev);
@@ -85,7 +85,7 @@ PUBLIC int do_unbind_device(message *m)
                        } else if (m->DEVMAN_RESULT != OK && m->DEVMAN_RESULT != 19) {
                                /* device drive deleted device already? */
                                printf("[W] devman.do_unbind_device(): driver could"
-                                      " not unbind device (%d)\n", m->DEVMAN_RESULT);
+                                      " not unbind device (%ld)\n", m->DEVMAN_RESULT);
                        } else { 
                                if (dev->state != DEVMAN_DEVICE_ZOMBIE) {
                                        dev->state = DEVMAN_DEVICE_UNBOUND;
index 776ea6c64304f65895fa0cafba5cc714b2c20e9d..e4a213b9d0d7670e0d1a88f5d07df126477dafe5 100644 (file)
@@ -298,7 +298,7 @@ PRIVATE void rw_block(
        op = (rw_flag == READING ? MFS_DEV_READ : MFS_DEV_WRITE);
        r = block_dev_io(op, dev, SELF_E, bp->b_data, pos, fs_block_size);
        if (r < 0) {
-               printf("Ext2(%d) I/O error on device %d/%d, block %lu\n",
+               printf("Ext2(%d) I/O error on device %d/%d, block %u\n",
                        SELF_E, major(dev), minor(dev), bp->b_blocknr);
                op_failed = 1;
        } else if( (unsigned) r != fs_block_size) {
@@ -426,7 +426,7 @@ PUBLIC void rw_scattered(
                        /* Transfer failed. An error? Do we care? */
                        if (r != OK && i == 0) {
                                printf(
-                               "fs: I/O error on device %d/%d, block %lu\n",
+                               "fs: I/O error on device %d/%d, block %u\n",
                                        major(dev), minor(dev), bp->b_blocknr);
                                bp->b_dev = NO_DEV;     /* invalidate block */
                                vm_forgetblocks();
index eeaa755cb68041637ae9d18a2cc58ed1ef1a2ddd..ee6c44931e037700cdbc0766e5ecab80af8a796a 100644 (file)
@@ -41,7 +41,7 @@ PUBLIC int fs_putnode(void)
   rip = find_inode(fs_dev, (ino_t) fs_m_in.REQ_INODE_NR);
 
   if (!rip) {
-       printf("%s:%d put_inode: inode #%d dev: %d not found\n", __FILE__,
+       printf("%s:%d put_inode: inode #%lu dev: %d not found\n", __FILE__,
                __LINE__, (ino_t) fs_m_in.REQ_INODE_NR, fs_dev);
        panic("fs_putnode failed");
   }
index 6f060680c94601c44d589be485cb991b0c096dab..df12953365d89df2db3c1076b26c7ae6549a46ff 100644 (file)
@@ -2629,7 +2629,7 @@ tcp_conn_t *tcp_conn;
        if (mtu > tcp_conn->tc_max_mtu)
                mtu= tcp_conn->tc_max_mtu;
        tcp_conn->tc_mtu= mtu;
-       DBLOCK(0x1, printf("tcp_mtu_incr: new mtu %ld for conn %d\n",
+       DBLOCK(0x1, printf("tcp_mtu_incr: new mtu %u for conn %u\n",
                mtu, tcp_conn-tcp_conn_table););
 }
 
index 558b11311a28327e2985e03f39b8768c379754b9..6cf6616aae1f9320b8fd40e8896fb403acd2f57f 100644 (file)
@@ -366,7 +366,7 @@ tcp_conn_t *tcp_conn;
                {
                        printf("RCV_NXT-RCV_LO != 0\n");
                        tcp_print_conn(tcp_conn);
-                       printf("lo_queue= %lu, hi_queue= %lu\n",
+                       printf("lo_queue= %u, hi_queue= %u\n",
                                lo_queue, hi_queue);
                        allright= FALSE;
                }
@@ -376,7 +376,7 @@ tcp_conn_t *tcp_conn;
                printf("RCV_NXT-RCV_LO != sizeof tc_rcvd_data\n");
                tcp_print_conn(tcp_conn);
                printf(
-               "lo_queue= %lu, hi_queue= %lu, sizeof tc_rcvd_data= %d\n",
+               "lo_queue= %u, hi_queue= %u, sizeof tc_rcvd_data= %d\n",
                        lo_queue, hi_queue, bf_bufsize(tcp_conn->tc_rcvd_data));
                allright= FALSE;
        }
@@ -497,7 +497,7 @@ tcp_hdr_t *tcp_hdr;
        else
                printf("???");
        printf(",%u ", ntohs(tcp_hdr->th_dstport));
-       printf(" 0x%lx", ntohl(tcp_hdr->th_seq_nr));
+       printf(" 0x%x", ntohl(tcp_hdr->th_seq_nr));
        if (tcp_hdr->th_flags & THF_FIN)
                printf(" <FIN>");
        if (tcp_hdr->th_flags & THF_SYN)
@@ -507,7 +507,7 @@ tcp_hdr_t *tcp_hdr;
        if (tcp_hdr->th_flags & THF_PSH)
                printf(" <PSH>");
        if (tcp_hdr->th_flags & THF_ACK)
-               printf(" <ACK 0x%lx %u>", ntohl(tcp_hdr->th_ack_nr),
+               printf(" <ACK 0x%x %u>", ntohl(tcp_hdr->th_ack_nr),
                        ntohs(tcp_hdr->th_window));
        if (tcp_hdr->th_flags & THF_URG)
                printf(" <URG %u>", tcp_hdr->th_urgptr);
@@ -527,15 +527,15 @@ tcp_conn_t *tcp_conn;
 
        tcp_print_state (tcp_conn);
        printf(
-       " ISS 0x%lx UNA +0x%lx(0x%lx) TRM +0x%lx(0x%lx) NXT +0x%lx(0x%lx)",
+       " ISS 0x%x UNA +0x%x(0x%x) TRM +0x%x(0x%x) NXT +0x%x(0x%x)",
                iss, tcp_conn->tc_SND_UNA-iss, tcp_conn->tc_SND_UNA, 
                tcp_conn->tc_SND_TRM-iss, tcp_conn->tc_SND_TRM,
                tcp_conn->tc_SND_NXT-iss, tcp_conn->tc_SND_NXT);
        printf(
-       " UP +0x%lx(0x%lx) PSH +0x%lx(0x%lx) ",
+       " UP +0x%x(0x%x) PSH +0x%x(0x%x) ",
                tcp_conn->tc_SND_UP-iss, tcp_conn->tc_SND_UP,
                tcp_conn->tc_SND_PSH-iss, tcp_conn->tc_SND_PSH);
-       printf(" snd_cwnd +0x%lx(0x%lx)",
+       printf(" snd_cwnd +0x%x(0x%x)",
                tcp_conn->tc_snd_cwnd-tcp_conn->tc_SND_UNA,
                tcp_conn->tc_snd_cwnd);
        printf(" transmit_seq ");
@@ -543,10 +543,10 @@ tcp_conn_t *tcp_conn;
                printf("0");
        else
        {
-               printf("+0x%lx(0x%lx)", tcp_conn->tc_transmit_seq-iss,
+               printf("+0x%x(0x%x)", tcp_conn->tc_transmit_seq-iss,
                        tcp_conn->tc_transmit_seq);
        }
-       printf(" IRS 0x%lx LO +0x%lx(0x%lx) NXT +0x%lx(0x%lx) HI +0x%lx(0x%lx)",
+       printf(" IRS 0x%x LO +0x%x(0x%x) NXT +0x%x(0x%x) HI +0x%x(0x%x)",
                irs, tcp_conn->tc_RCV_LO-irs, tcp_conn->tc_RCV_LO,
                tcp_conn->tc_RCV_NXT-irs, tcp_conn->tc_RCV_NXT,
                tcp_conn->tc_RCV_HI-irs, tcp_conn->tc_RCV_HI);
index e4bb3a8a45546d9fac1310bab0cf5724499d5c38..b48a7de0bd2cc399731237f75113f229de6c5693 100644 (file)
@@ -716,7 +716,7 @@ TIME-WAIT:
                        tcp_conn_write(tcp_conn, 1);
                        DBLOCK(1, printf(
                        "got an ack of something I haven't send\n");
-                               printf( "seg_ack= %lu, SND_NXT= %lu\n",
+                               printf( "seg_ack= %u, SND_NXT= %u\n",
                                seg_ack, snd_nxt));
                        break;
                }
index 2fe6787a06e6c77cff63c73f8ee07a0c772e947b..f2abc08935f25d85e4509ee6de889a9fa7ac6cbe 100644 (file)
@@ -237,7 +237,9 @@ void startup(int linenr, struct ttyent *ttyp)
   pid_t pid;                           /* new pid */
   int err[2];                          /* error reporting pipe */
   char line[32];                       /* tty device name */
+#ifndef __NBSD_LIBC
   int status;
+#endif
 #ifdef __NBSD_LIBC
   char **ty_getty_argv;
 #endif
index 87eb3f538fc9686b2f74f18cf875f619f7ef6339..28b8e1efd296bc873b1596a0c3002881e5e45cfb 100644 (file)
@@ -420,7 +420,7 @@ PUBLIC void memmap_dmp()
        size = rp->p_memmap[T].mem_len
                + ((rp->p_memmap[S].mem_phys + rp->p_memmap[S].mem_len)
                                                - rp->p_memmap[D].mem_phys);
-       printf("%-7.7s%7lx %8lx %4x %4x %4x %4x %5x %5x %8lu\n",
+       printf("%-7.7s%7lx %8lx %4x %4x %4x %4x %5x %5x %8u\n",
               rp->p_name,
               (unsigned long) rp->p_reg.pc,
               (unsigned long) rp->p_reg.sp,
index 13ef4ca87284a60f5ab9071e96074f93bc279aa2..6fafb5b05f3c92bfc43b3646b42510d1460df4b1 100644 (file)
@@ -77,7 +77,7 @@ PUBLIC void vm_dmp()
                return;
        }
 
-       printf("Total %u kB, free %u kB, largest free %u kB, cached %u kB\n",
+       printf("Total %lu kB, free %lu kB, largest free %lu kB, cached %lu kB\n",
                vsi.vsi_total * (vsi.vsi_pagesize / 1024),
                vsi.vsi_free * (vsi.vsi_pagesize / 1024),
                vsi.vsi_largest * (vsi.vsi_pagesize / 1024),
index 4a5166ab322f41aea59ef9bc8c55d98d291b3c09..d58e93e4f6843baaaf1c7f31679410d883848e7d 100644 (file)
@@ -103,7 +103,7 @@ register struct buf *bp;    /* buffer pointer */
   if (r != block_size) {
     if (r >= 0) r = END_OF_FILE;
     if (r != END_OF_FILE)
-      printf("ISOFS(%d) I/O error on device %d/%d, block %ld\n",
+      printf("ISOFS(%d) I/O error on device %d/%d, block %u\n",
             SELF_E, (fs_dev>>MAJOR)&BYTE, (fs_dev>>MINOR)&BYTE,
             bp->b_blocknr);
 
index 0929d6530423d92247cd25f9a9d1a6f34b84efd1..4d06a045a21ca8b8d902bc4307551120b0f498dc 100644 (file)
@@ -11,7 +11,7 @@ SRCS= lwip.c          \
 
 .PATH: ${.CURDIR}/generic
 
-DPADD+=        ${LIBDRIVER} ${LIBSYS} ${LIBMINIXUTIL}
+DPADD+=        ${LIBDRIVER} ${LIBSYS} ${LIBMINIXUTIL} ${LIBLWIP}
 LDADD+=        -ldriver -lsys -lminixutil -ltimers -llwip
 
 MAN=
index 0fd00002639403371881b29b168614200fc88ab1..12ba42c8e53ba4cef9aa1e3718587c4f81ea4379 100644 (file)
@@ -10,7 +10,7 @@
 #include <minix/sysutil.h>
 #include <minix/safecopies.h>
 
-#include <net/ioctl.h>
+#include <sys/ioc_net.h>
 #include <net/gen/in.h>
 #include <net/gen/ip_io.h>
 #include <net/gen/route.h>
@@ -418,8 +418,8 @@ void driver_up(const char * label, endpoint_t ep)
         * at the very begining. dhcp should use raw socket but it is a little
         * tricy in the current dhcp implementation
         */
-       if (!netif_add(&nic->netif, &ip_addr_any, &ip_addr_none, &ip_addr_none,
-                               nic, ethernetif_init, ethernet_input)) {
+       if (!netif_add(&nic->netif, (ip_addr_t *) &ip_addr_any, &ip_addr_none,
+                       &ip_addr_none, nic, ethernetif_init, ethernet_input)) {
                printf("LWIP : failed to add device /dev/%s\n", nic->name);
                nic->drv_ep = NONE;
        }
index 743ab9a583376702a752982ae8e256791e1b1c35..9608268b9acab5aaf0fa14de2afdddc4ead10bf4 100644 (file)
@@ -79,7 +79,6 @@ extern struct ip_conf ip_conf[IP_PORT_MAX];
 extern struct tcp_conf tcp_conf[IP_PORT_MAX];
 extern struct udp_conf udp_conf[IP_PORT_MAX];
 void read_conf(void);
-extern char *sbrk(int);
 void *alloc(size_t size);
 
 /* Options */
index 36efdcf4cc06fa4f6ae61e526a013c4de1f77609..d22abb60935be5561d8de5af2f70fecaad2ddbc0 100644 (file)
@@ -1,6 +1,6 @@
 #include <stdlib.h>
 
-#include <net/ioctl.h>
+#include <sys/ioc_net.h>
 #include <net/gen/in.h>
 #include <net/gen/ip_io.h>
 
index 373a88b57d3c7395c9f2c0d8b24af31e2e10d5de..75be4a275bc1e51e390638a92a5eecdb6a648e11 100644 (file)
@@ -13,7 +13,7 @@
 
 #include <lwip/tcp.h>
 
-#include <net/ioctl.h>
+#include <sys/ioc_net.h>
 
 #include "inet_config.h"
 #include "proto.h"
index 78e3c4225217f29016354dccb9acdce9390c52ef..f38df285efb990ca7130fd44acecbccc2ddab85b 100644 (file)
@@ -2,7 +2,7 @@
 #include <assert.h>
 #include <minix/sysutil.h>
 
-#include <net/ioctl.h>
+#include <sys/ioc_net.h>
 #include <net/gen/in.h>
 #include <net/gen/tcp.h>
 #include <net/gen/tcp_io.h>
index 2a38dc8ca515ae97c0ed7229c094eb3c0655df5f..fafb0dc5838f72e82b0bb61f561eecb3f4376951 100644 (file)
@@ -2,7 +2,7 @@
 
 #include <minix/sysutil.h>
 
-#include <net/ioctl.h>
+#include <sys/ioc_net.h>
 #include <net/gen/in.h>
 #include <net/gen/udp.h>
 #include <net/gen/udp_io.h>
index cd287241cd34f85773315a170fc1eec2ce088159..fa1d55b02719e36d30c0b4b4c249036eed9ed628 100644 (file)
@@ -168,14 +168,11 @@ PRIVATE int sef_cb_init_fresh(int type, sef_init_info_t *info)
   int s,i;
   int nr_image_srvs, nr_image_priv_srvs, nr_uncaught_init_srvs;
   struct rproc *rp;
-  struct rproc *replica_rp;
   struct rprocpub *rpub;
   struct boot_image image[NR_BOOT_PROCS];
   struct boot_image_priv *boot_image_priv;
   struct boot_image_sys *boot_image_sys;
   struct boot_image_dev *boot_image_dev;
-  int pid, replica_pid;
-  endpoint_t replica_endpoint;
   int ipc_to;
   int *calls;
   int all_c[] = { ALL_C, NULL_C };
index 7f0c57ee8ce9e919ca2d0908109b969f764da1e6..c5eba016e6c7681068d1b3c01f469b385a5c7f45 100644 (file)
@@ -749,7 +749,7 @@ struct rproc *rp;                           /* pointer to service slot */
          r = ds_retrieve_label_endpt("devman",&ep);
   
          if (r != OK) {
-                  printf("RS: devman not running?", r);
+               printf("RS: devman not running?");
          } else {
                m.m_type = DEVMAN_UNBIND;
                m.DEVMAN_ENDPOINT  = rpub->endpoint;
index c2dab242cfb8750d92f70934ac31a00a1e65e2da..db45ef9ef1ce2209bb3c6f9f8ae1ac6c5930c941 100644 (file)
@@ -21,7 +21,8 @@
 #include "fs.h"
 #include <fcntl.h>
 #include <assert.h>
-#include <unistd.h>    /* cc runs out of memory with unistd.h :-( */
+#include <unistd.h>
+#include <string.h>
 #include <minix/callnr.h>
 #include <minix/safecopies.h>
 #include <minix/endpoint.h>
@@ -387,11 +388,11 @@ int cpid; /* Child process id */
    * as it isn't blocking on i/o.
    */
   if(GRANT_VALID(fp->fp_grant)) {
-       printf("vfs: fork: fp (endpoint %d) has grant %ld\n", fp->fp_endpoint, fp->fp_grant);
+       printf("vfs: fork: fp (endpoint %d) has grant %d\n", fp->fp_endpoint, fp->fp_grant);
        panic("fp contains valid grant");
   }
   if(GRANT_VALID(cp->fp_grant)) {
-       printf("vfs: fork: cp (endpoint %d) has grant %ld\n", cp->fp_endpoint, cp->fp_grant);
+       printf("vfs: fork: cp (endpoint %d) has grant %d\n", cp->fp_endpoint, cp->fp_grant);
        panic("cp contains valid grant");
   }
 
index 6d84ff35e244aa0b7df567e84561cdcb2f57a04a..ae9a8ded0d03840855021abc973f6bf7bad52e34 100644 (file)
@@ -786,7 +786,7 @@ int status;
        assert((vp->v_mode & I_TYPE) == I_CHAR_SPECIAL); /* Must be char. special */
        if (vp->v_sdev != dev) {
                printf("VFS (%s:%d): expected reply from dev %d not %d\n",
-                       vp->v_sdev, dev);
+                       __FILE__, __LINE__, vp->v_sdev, dev);
                return;
        }
   }
index f3260f836b0efe273e7e26434125c3300b778205..e458fc5cc20f1c52701f9e5982c0487d0e9d349a 100644 (file)
@@ -71,7 +71,7 @@ PUBLIC int do_mmap(message *m)
                if(m->VMM_FLAGS & MAP_IPC_SHARED) {
                        vrflags |= VR_SHARED;
                        /* Shared memory has to be preallocated. */
-                       if(m->VMM_FLAGS & (MAP_PREALLOC|MAP_ANON) !=
+                       if((m->VMM_FLAGS & (MAP_PREALLOC|MAP_ANON)) !=
                                (MAP_PREALLOC|MAP_ANON)) {
                                return EINVAL;
                        }
index 3774c793677c8fbd3bb1061a2485ea8cf27b2414..3ef55e18dffd820d108fa3fecd1c9613c802f5d6 100644 (file)
@@ -67,7 +67,7 @@ PUBLIC int do_query_exit(message *m)
  *===========================================================================*/
 PUBLIC int do_notify_sig(message *m)
 {
-       int i, avails = 0, p;
+       int i, avails = 0;
        endpoint_t ep = m->VM_NOTIFY_SIG_ENDPOINT;
        endpoint_t ipc_ep = m->VM_NOTIFY_SIG_IPC;
        int r;