diff options
author | archie <archie@FreeBSD.org> | 1998-12-06 22:58:23 +0000 |
---|---|---|
committer | archie <archie@FreeBSD.org> | 1998-12-06 22:58:23 +0000 |
commit | 167c036e91fb24a62d627d16a2f3afa6d875c9e2 (patch) | |
tree | e40a696092a51458b052ff258b3700d51fc2ca09 /usr.bin/compress | |
parent | 3f56407712318be6faa0b98ad8db4b5a83ef4c93 (diff) | |
download | FreeBSD-src-167c036e91fb24a62d627d16a2f3afa6d875c9e2.zip FreeBSD-src-167c036e91fb24a62d627d16a2f3afa6d875c9e2.tar.gz |
Tweaks to allow compiling -Wall (mostly adding "const" to char rcsid[]).
Diffstat (limited to 'usr.bin/compress')
-rw-r--r-- | usr.bin/compress/Makefile | 1 | ||||
-rw-r--r-- | usr.bin/compress/compress.c | 4 | ||||
-rw-r--r-- | usr.bin/compress/zopen.c | 5 |
3 files changed, 6 insertions, 4 deletions
diff --git a/usr.bin/compress/Makefile b/usr.bin/compress/Makefile index 0f6f5dd..02f7fbb 100644 --- a/usr.bin/compress/Makefile +++ b/usr.bin/compress/Makefile @@ -1,6 +1,7 @@ # @(#)Makefile 8.2 (Berkeley) 4/17/94 PROG= compress +CFLAGS+=-Wall SRCS= compress.c zopen.c LINKS= ${BINDIR}/compress ${BINDIR}/uncompress MLINKS= compress.1 uncompress.1 diff --git a/usr.bin/compress/compress.c b/usr.bin/compress/compress.c index 5e323d3..e819635 100644 --- a/usr.bin/compress/compress.c +++ b/usr.bin/compress/compress.c @@ -32,13 +32,13 @@ */ #ifndef lint -static char copyright[] = +static const char copyright[] = "@(#) Copyright (c) 1992, 1993\n\ The Regents of the University of California. All rights reserved.\n"; #endif /* not lint */ #ifndef lint -static char sccsid[] = "@(#)compress.c 8.2 (Berkeley) 1/7/94"; +static const char sccsid[] = "@(#)compress.c 8.2 (Berkeley) 1/7/94"; #endif /* not lint */ #include <sys/param.h> diff --git a/usr.bin/compress/zopen.c b/usr.bin/compress/zopen.c index 5e5357b..abe31f2 100644 --- a/usr.bin/compress/zopen.c +++ b/usr.bin/compress/zopen.c @@ -388,7 +388,7 @@ output(zs, ocode) * Since ocode is always >= 8 bits, only need to mask the first * hunk on the left. */ - *bp = (*bp & rmask[r_off]) | (ocode << r_off) & lmask[r_off]; + *bp = (*bp & rmask[r_off]) | ((ocode << r_off) & lmask[r_off]); bp++; bits -= (8 - r_off); ocode >>= 8 - r_off; @@ -698,7 +698,7 @@ zopen(fname, mode, bits) { struct s_zstate *zs; - if (mode[0] != 'r' && mode[0] != 'w' || mode[1] != '\0' || + if ((mode[0] != 'r' && mode[0] != 'w') || mode[1] != '\0' || bits < 0 || bits > BITS) { errno = EINVAL; return (NULL); @@ -738,4 +738,5 @@ zopen(fname, mode, bits) return (funopen(zs, NULL, zwrite, NULL, zclose)); } /* NOTREACHED */ + return (NULL); } |