summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoralex <alex@FreeBSD.org>1997-12-29 00:09:06 +0000
committeralex <alex@FreeBSD.org>1997-12-29 00:09:06 +0000
commit005e82d0d48c18bf9c8f7dd68fbdddaecd02fa38 (patch)
treed6173536ac119a8f4ca284ec466429ed22238d6c
parent2d2c1486baa4d002f1ec27ce2fdbf344aa08d814 (diff)
downloadFreeBSD-src-005e82d0d48c18bf9c8f7dd68fbdddaecd02fa38.zip
FreeBSD-src-005e82d0d48c18bf9c8f7dd68fbdddaecd02fa38.tar.gz
-Wall cleanup.
-rw-r--r--usr.bin/biff/biff.c7
-rw-r--r--usr.bin/chat/chat.c4
-rw-r--r--usr.bin/cksum/crc32.c5
-rw-r--r--usr.bin/colcrt/colcrt.c14
-rw-r--r--usr.bin/colrm/colrm.c4
-rw-r--r--usr.bin/ctags/ctags.c2
-rw-r--r--usr.bin/ctags/fortran.c2
-rw-r--r--usr.bin/ctags/yacc.c2
8 files changed, 26 insertions, 14 deletions
diff --git a/usr.bin/biff/biff.c b/usr.bin/biff/biff.c
index a3e450c..52f5229 100644
--- a/usr.bin/biff/biff.c
+++ b/usr.bin/biff/biff.c
@@ -30,7 +30,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id$
+ * $Id: biff.c,v 1.3 1997/06/23 06:45:38 charnier Exp $
*/
#ifndef lint
@@ -54,6 +54,7 @@ static char sccsid[] = "@(#)biff.c 8.1 (Berkeley) 6/6/93";
static void usage __P((void));
+int
main(argc, argv)
int argc;
char *argv[];
@@ -80,7 +81,7 @@ main(argc, argv)
if (*argv == NULL) {
(void)printf("is %s\n", sb.st_mode&0100 ? "y" : "n");
- exit(sb.st_mode & 0100 ? 0 : 1);
+ return(sb.st_mode & 0100 ? 0 : 1);
}
switch(argv[0][0]) {
@@ -95,7 +96,7 @@ main(argc, argv)
default:
usage();
}
- exit(sb.st_mode & 0100 ? 0 : 1);
+ return(sb.st_mode & 0100 ? 0 : 1);
}
static void
diff --git a/usr.bin/chat/chat.c b/usr.bin/chat/chat.c
index 300849d..568bb48 100644
--- a/usr.bin/chat/chat.c
+++ b/usr.bin/chat/chat.c
@@ -70,7 +70,7 @@
*/
#ifndef lint
-static char rcsid[] = "$Id: chat.c,v 1.8 1997/06/24 06:52:33 charnier Exp $";
+static char rcsid[] = "$Id: chat.c,v 1.9 1997/08/22 15:24:36 peter Exp $";
#endif
#include <stdio.h>
@@ -367,7 +367,7 @@ char **argv;
void do_file (chat_file)
char *chat_file;
{
- int linect, len, sendflg;
+ int linect, sendflg;
char *sp, *arg, quote;
char buf [STR_LEN];
FILE *cfp;
diff --git a/usr.bin/cksum/crc32.c b/usr.bin/cksum/crc32.c
index ffeacc1..51aff76 100644
--- a/usr.bin/cksum/crc32.c
+++ b/usr.bin/cksum/crc32.c
@@ -86,9 +86,11 @@ unsigned long crctab[256] = {
#include <stdio.h>
#include <sys/types.h>
+#include <unistd.h>
u_long crc32_total = 0 ;
+int
crc32(fd, cval, clen)
register int fd;
u_long *cval, *clen;
@@ -96,11 +98,10 @@ crc32(fd, cval, clen)
u_long crc = ~0;
char buf[BUFSIZ], *p ;
int len, nr ;
- FILE *in;
len = 0 ;
crc32_total = ~crc32_total ;
- while (nr = read(fd, buf, sizeof(buf)))
+ while ((nr = read(fd, buf, sizeof(buf))))
for (len += nr, p = buf; nr--; ++p) {
CRC(crc, *p) ;
CRC(crc32_total, *p) ;
diff --git a/usr.bin/colcrt/colcrt.c b/usr.bin/colcrt/colcrt.c
index f3661a8..40fe5ce 100644
--- a/usr.bin/colcrt/colcrt.c
+++ b/usr.bin/colcrt/colcrt.c
@@ -41,7 +41,11 @@ static char copyright[] =
static char sccsid[] = "@(#)colcrt.c 8.1 (Berkeley) 6/6/93";
#endif /* not lint */
+#include <err.h>
+#include <stdlib.h>
#include <stdio.h>
+#include <string.h>
+#include <unistd.h>
/*
* colcrt - replaces col for crts with new nroff esp. when using tbl.
* Bill Joy UCB July 14, 1977
@@ -67,6 +71,9 @@ char printall;
FILE *f;
static void usage __P((void));
+static void pflush __P((int));
+static int plus __P((char, char));
+static void move __P((int, int));
int
main(argc, argv)
@@ -186,19 +193,21 @@ usage()
exit(1);
}
+static int
plus(c, d)
char c, d;
{
- return (c == '|' && d == '-' || d == '_');
+ return ((c == '|' && d == '-') || d == '_');
}
int first;
+static void
pflush(ol)
int ol;
{
- register int i, j;
+ register int i;
register char *cp;
char lastomit;
int l;
@@ -229,6 +238,7 @@ pflush(ol)
first = 1;
}
+static void
move(l, m)
int l, m;
{
diff --git a/usr.bin/colrm/colrm.c b/usr.bin/colrm/colrm.c
index 1a50405..1195300 100644
--- a/usr.bin/colrm/colrm.c
+++ b/usr.bin/colrm/colrm.c
@@ -30,7 +30,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: colrm.c,v 1.3 1997/06/26 11:26:20 charnier Exp $
+ * $Id: colrm.c,v 1.4 1997/06/30 11:05:42 charnier Exp $
*/
#ifndef lint
@@ -116,7 +116,7 @@ main(argc, argv)
break;
}
- if ((!start || column < start || stop && column > stop) &&
+ if ((!start || column < start || (stop && column > stop)) &&
putchar(ch) == EOF)
check(stdout);
}
diff --git a/usr.bin/ctags/ctags.c b/usr.bin/ctags/ctags.c
index 725dfb5..421d819 100644
--- a/usr.bin/ctags/ctags.c
+++ b/usr.bin/ctags/ctags.c
@@ -229,7 +229,7 @@ find_entries(file)
char *cp;
lineno = 0; /* should be 1 ?? KB */
- if (cp = strrchr(file, '.')) {
+ if ((cp = strrchr(file, '.'))) {
if (cp[1] == 'l' && !cp[2]) {
int c;
diff --git a/usr.bin/ctags/fortran.c b/usr.bin/ctags/fortran.c
index d0db9ed..0706b49 100644
--- a/usr.bin/ctags/fortran.c
+++ b/usr.bin/ctags/fortran.c
@@ -119,7 +119,7 @@ PF_funcs()
continue;
for (cp = lbp + 1; *cp && intoken(*cp); ++cp)
continue;
- if (cp = lbp + 1)
+ if ((cp = lbp + 1))
continue;
*cp = EOS;
(void)strcpy(tok, lbp);
diff --git a/usr.bin/ctags/yacc.c b/usr.bin/ctags/yacc.c
index c013283..1ed4c7d 100644
--- a/usr.bin/ctags/yacc.c
+++ b/usr.bin/ctags/yacc.c
@@ -91,7 +91,7 @@ y_entries()
in_rule = NO;
break;
default:
- if (in_rule || !isalpha(c) && c != '.' && c != '_')
+ if (in_rule || (!isalpha(c) && c != '.' && c != '_'))
break;
sp = tok;
*sp++ = c;
OpenPOWER on IntegriCloud