diff options
author | dwmalone <dwmalone@FreeBSD.org> | 2002-03-30 16:46:04 +0000 |
---|---|---|
committer | dwmalone <dwmalone@FreeBSD.org> | 2002-03-30 16:46:04 +0000 |
commit | e1a6bcf77d8492a7a09e3a1c5f59c69f8c4ac59a (patch) | |
tree | 86aa80086e35a7e5055b8f5b87e4fb46dce9f5fc | |
parent | 65dd7ee2d664fd3e803c25710ebb8cff700d4693 (diff) | |
download | FreeBSD-src-e1a6bcf77d8492a7a09e3a1c5f59c69f8c4ac59a.zip FreeBSD-src-e1a6bcf77d8492a7a09e3a1c5f59c69f8c4ac59a.tar.gz |
1) Add missing prototypes for fmt_perm and cvt_time.
2) Move a break outside a #if block to keep gcc3 from seeing a "default:"
at the end of a block.
3) Fix some format warnings. Some remain which can be fixed more easily
when we have a full C99 printf.
-rw-r--r-- | usr.bin/ipcs/ipcs.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/usr.bin/ipcs/ipcs.c b/usr.bin/ipcs/ipcs.c index f780841..950be25 100644 --- a/usr.bin/ipcs/ipcs.c +++ b/usr.bin/ipcs/ipcs.c @@ -71,6 +71,8 @@ struct msqid_ds *msqids; struct shminfo shminfo; struct shmid_ds *shmsegs; +char *fmt_perm(u_short); +void cvt_time(time_t, char *); void sysctlgatherstruct(void *addr, size_t size, struct scgs_vector *vec); void kget(int idx, void *addr, size_t size); void usage(void); @@ -270,8 +272,8 @@ main(argc, argv) if (symbols[i].n_value == 0) warnx("symbol %s not found", symbols[i].n_name); - break; #endif + break; } } @@ -326,7 +328,7 @@ main(argc, argv) printf("q %6d %10d %s %8s %8s", IXSEQ_TO_IPCID(i, msqptr->msg_perm), - msqptr->msg_perm.key, + (int)msqptr->msg_perm.key, fmt_perm(msqptr->msg_perm.mode), user_from_uid(msqptr->msg_perm.uid, 0), group_from_gid(msqptr->msg_perm.gid, 0)); @@ -337,12 +339,12 @@ main(argc, argv) group_from_gid(msqptr->msg_perm.cgid, 0)); if (option & OUTSTANDING) - printf(" %6d %6d", + printf(" %6lu %6lu", msqptr->msg_cbytes, msqptr->msg_qnum); if (option & BIGGEST) - printf(" %6d", + printf(" %6lu", msqptr->msg_qbytes); if (option & PID) @@ -415,7 +417,7 @@ main(argc, argv) printf("m %6d %10d %s %8s %8s", IXSEQ_TO_IPCID(i, shmptr->shm_perm), - shmptr->shm_perm.key, + (int)shmptr->shm_perm.key, fmt_perm(shmptr->shm_perm.mode), user_from_uid(shmptr->shm_perm.uid, 0), group_from_gid(shmptr->shm_perm.gid, 0)); @@ -507,7 +509,7 @@ main(argc, argv) printf("s %6d %10d %s %8s %8s", IXSEQ_TO_IPCID(i, semaptr->sem_perm), - semaptr->sem_perm.key, + (int)semaptr->sem_perm.key, fmt_perm(semaptr->sem_perm.mode), user_from_uid(semaptr->sem_perm.uid, 0), group_from_gid(semaptr->sem_perm.gid, 0)); |