diff options
author | dg <dg@FreeBSD.org> | 1994-09-17 13:24:29 +0000 |
---|---|---|
committer | dg <dg@FreeBSD.org> | 1994-09-17 13:24:29 +0000 |
commit | 88bd88b7a08c637b5d4f91001df5ea3e2b20ef4b (patch) | |
tree | bb422f24de529062253c85a420d7b5dd1ec74bc6 | |
parent | a9cbb4294c69a9d8cc6f8813b32af6cc2ff87e06 (diff) | |
download | FreeBSD-src-88bd88b7a08c637b5d4f91001df5ea3e2b20ef4b.zip FreeBSD-src-88bd88b7a08c637b5d4f91001df5ea3e2b20ef4b.tar.gz |
Got rid of compiler warnings.
-rw-r--r-- | sys/kern/sysv_msg.c | 15 | ||||
-rw-r--r-- | sys/kern/sysv_sem.c | 6 | ||||
-rw-r--r-- | sys/sys/msg.h | 10 | ||||
-rw-r--r-- | sys/sys/sem.h | 4 | ||||
-rw-r--r-- | sys/sys/shm.h | 4 |
5 files changed, 16 insertions, 23 deletions
diff --git a/sys/kern/sysv_msg.c b/sys/kern/sysv_msg.c index 0d68840..cdd9226 100644 --- a/sys/kern/sysv_msg.c +++ b/sys/kern/sysv_msg.c @@ -1,4 +1,4 @@ -/* $Id$ */ +/* $Id: sysv_msg.c,v 1.1 1994/09/13 14:46:57 dfr Exp $ */ /* * Implementation of SVID messages @@ -37,7 +37,7 @@ int nfree_msgmaps; /* # of free map entries */ short free_msgmaps; /* head of linked list of free map entries */ struct msg *free_msghdrs; /* list of free msg headers */ -int +void msginit() { register int i; @@ -288,7 +288,7 @@ msgget(p, uap, retval) int key = uap->key; int msgflg = uap->msgflg; struct ucred *cred = p->p_ucred; - register struct msqid_ds *msqptr; + register struct msqid_ds *msqptr = NULL; #ifdef MSG_DEBUG_OK printf("msgget(0x%x, 0%o)\n", key, msgflg); @@ -450,7 +450,7 @@ msgsnd(p, uap, retval) * (inside this loop in case msg_qbytes changes while we sleep) */ - if (msgsz < 0 || msgsz > msqptr->msg_qbytes) { + if (msgsz > msqptr->msg_qbytes) { #ifdef MSG_DEBUG_OK printf("msgsz > msqptr->msg_qbytes\n"); #endif @@ -774,13 +774,6 @@ msgrcv(p, uap, retval) return(eval); } - if (msgsz < 0) { -#ifdef MSG_DEBUG_OK - printf("msgsz < 0\n"); -#endif - return(EINVAL); - } - msghdr = NULL; while (msghdr == NULL) { if (msgtyp == 0) { diff --git a/sys/kern/sysv_sem.c b/sys/kern/sysv_sem.c index fb0ff5f..53a2e9f 100644 --- a/sys/kern/sysv_sem.c +++ b/sys/kern/sysv_sem.c @@ -1,4 +1,4 @@ -/* $Id$ */ +/* $Id: sysv_sem.c,v 1.1 1994/09/13 14:47:00 dfr Exp $ */ /* * Implementation of SVID semaphores @@ -21,7 +21,7 @@ int semtot = 0; static struct proc *semlock_holder = NULL; -int +void seminit() { register int i; @@ -182,6 +182,7 @@ semu_alloc(p) panic("semu_alloc - second attempt failed"); } } + return (NULL); } /* @@ -833,6 +834,7 @@ done: * Go through the undo structures for this process and apply the adjustments to * semaphores. */ +void semexit(p) struct proc *p; { diff --git a/sys/sys/msg.h b/sys/sys/msg.h index 5332af1..8f559a9 100644 --- a/sys/sys/msg.h +++ b/sys/sys/msg.h @@ -1,4 +1,4 @@ -/* $Id$ */ +/* $Id: msg.h,v 1.1 1994/09/13 14:47:34 dfr Exp $ */ /* $NetBSD: msg.h,v 1.4 1994/06/29 06:44:43 cgd Exp $ */ /* @@ -92,9 +92,9 @@ struct msginfo { msgssz, /* size of a message segment (see notes above) */ msgseg; /* number of message segments */ }; -struct msginfo msginfo; - #ifdef KERNEL +extern struct msginfo msginfo; + #ifndef MSGSSZ #define MSGSSZ 8 /* Each segment must be 2^N long */ #endif @@ -120,13 +120,11 @@ struct msginfo msginfo; #define MSQID(ix,ds) ((ix) & 0xffff | (((ds).msg_perm.seq << 16) & 0xffff0000)) #define MSQID_IX(id) ((id) & 0xffff) #define MSQID_SEQ(id) (((id) >> 16) & 0xffff) -#endif /* * The rest of this file is specific to this particular implementation. */ -#ifdef KERNEL /* * Stuff allocated in machdep.h @@ -144,7 +142,7 @@ struct msqid_ds *msqids; /* MSGMNI msqid_ds struct's */ #define MSG_LOCKED 01000 /* Is this msqid_ds locked? */ -#endif +#endif /* KERNEL */ #ifndef KERNEL #include <sys/cdefs.h> diff --git a/sys/sys/sem.h b/sys/sys/sem.h index 6b982c4..c931dcd 100644 --- a/sys/sys/sem.h +++ b/sys/sys/sem.h @@ -1,4 +1,4 @@ -/* $Id$ */ +/* $Id: sem.h,v 1.1 1994/09/13 14:47:35 dfr Exp $ */ /* $NetBSD: sem.h,v 1.5 1994/06/29 06:45:15 cgd Exp $ */ /* @@ -106,7 +106,7 @@ struct seminfo { semvmx, /* semaphore maximum value */ semaem; /* adjust on exit max value */ }; -struct seminfo seminfo; +extern struct seminfo seminfo; /* internal "mode" bits */ #define SEM_ALLOC 01000 /* semaphore is allocated */ diff --git a/sys/sys/shm.h b/sys/sys/shm.h index 28e638e..e68acff 100644 --- a/sys/sys/shm.h +++ b/sys/sys/shm.h @@ -1,4 +1,4 @@ -/* $Id$ */ +/* $Id: shm.h,v 1.1 1994/09/13 14:47:36 dfr Exp $ */ /* $NetBSD: shm.h,v 1.15 1994/06/29 06:45:17 cgd Exp $ */ /* @@ -70,7 +70,7 @@ struct shminfo { shmseg, /* max shared memory segments per process */ shmall; /* max amount of shared memory (pages) */ }; -struct shminfo shminfo; +extern struct shminfo shminfo; struct shmid_ds *shmsegs; #else /* !KERNEL */ |