From 22f901a57c1958698d9cecf2b40a9fc0fd04f786 Mon Sep 17 00:00:00 2001 From: imp Date: Sun, 25 Apr 1999 22:37:58 +0000 Subject: More egcs warning fixes: o main returns int not void o use return 0 at end of main when needed o use braces to avoid potentially ambiguous else o don't default to type int o #ifdef 0 -> #if 0 Reviewed by: obrien and chuckr --- usr.bin/cmp/special.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'usr.bin/cmp/special.c') diff --git a/usr.bin/cmp/special.c b/usr.bin/cmp/special.c index b843cc8..a9033b3 100644 --- a/usr.bin/cmp/special.c +++ b/usr.bin/cmp/special.c @@ -73,13 +73,15 @@ c_special(fd1, file1, skip1, fd2, file2, skip2) ch2 = getc(fp2); if (ch1 == EOF || ch2 == EOF) break; - if (ch1 != ch2) + if (ch1 != ch2) { if (lflag) { dfound = 1; (void)printf("%6qd %3o %3o\n", byte, ch1, ch2); - } else + } else { diffmsg(file1, file2, byte, line); /* NOTREACHED */ + } + } if (ch1 == '\n') ++line; } -- cgit v1.1