-Wall cleanup.

This commit is contained in:
Alexander Langer 1997-12-29 00:09:06 +00:00
parent 0259912885
commit d7d1005304
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=32069
8 changed files with 26 additions and 14 deletions

View file

@ -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

View file

@ -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;

View file

@ -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) ;

View file

@ -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;
{

View file

@ -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);
}

View file

@ -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;

View file

@ -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);

View file

@ -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;