Date: Sun, 22 Oct 2000 01:14:56 +1100 (EST) From: andrew@ugh.net.au To: FreeBSD-gnats-submit@freebsd.org Subject: bin/22187: silence a warning from gcc when compiling finger Message-ID: <20001021141456.17910A842@starbug.ugh.net.au>
index | next in thread | raw e-mail
>Number: 22187
>Category: bin
>Synopsis: silence a warning from gcc when compiling finger
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Sat Oct 21 07:20:01 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator: Andrew
>Release: FreeBSD 4.1.1-STABLE i386
>Organization:
UgH!
>Environment:
>Description:
If you compile finger with -Wall a lot of warnings are produced. Most are about
strftime and %c only returning 2 digits under some (non BSD) systems which I
don't think really matters. One is a suggested parentheses around an && which
this patch addresses. This patch also removes the test for ch being a space
as that will already have been caught by isprint(ch).
>How-To-Repeat:
Compile /usr/bin/finger with -Wall.
>Fix:
--- lprint.c.orig Mon Oct 2 14:11:48 2000
+++ lprint.c Sun Oct 22 00:01:04 2000
@@ -353,7 +353,7 @@
meta = 1;
} else
meta = 0;
- if (isprint(ch) || !meta && (ch == ' ' || ch == '\t' || ch == '\n'))
+ if (isprint(ch) || (!meta && (ch == '\t' || ch == '\n')))
(void)putchar(ch);
else {
(void)putchar('^');
>Release-Note:
>Audit-Trail:
>Unformatted:
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20001021141456.17910A842>
