From owner-freebsd-bugs Sat Oct 21 7:20: 9 2000 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 95E1137B4CF for ; Sat, 21 Oct 2000 07:20:01 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id HAA76487; Sat, 21 Oct 2000 07:20:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from starbug.ugh.net.au (starbug.ugh.net.au [203.31.238.37]) by hub.freebsd.org (Postfix) with ESMTP id 6D49A37B4C5 for ; Sat, 21 Oct 2000 07:15:03 -0700 (PDT) Received: by starbug.ugh.net.au (Postfix, from userid 1000) id 17910A842; Sun, 22 Oct 2000 01:14:56 +1100 (EST) Message-Id: <20001021141456.17910A842@starbug.ugh.net.au> Date: Sun, 22 Oct 2000 01:14:56 +1100 (EST) From: andrew@ugh.net.au Reply-To: andrew@ugh.net.au To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: bin/22187: silence a warning from gcc when compiling finger Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >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