From andrew@ugh.net.au  Sat Oct 21 07:15:04 2000
Return-Path: <andrew@ugh.net.au>
Received: from starbug.ugh.net.au (starbug.ugh.net.au [203.31.238.37])
	by hub.freebsd.org (Postfix) with ESMTP id 6D49A37B4C5
	for <FreeBSD-gnats-submit@freebsd.org>; 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
Subject: silence a warning from gcc when compiling finger
X-Send-Pr-Version: 3.2

>Number:         22187
>Category:       bin
>Synopsis:       silence a warning from gcc when compiling finger
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Oct 21 07:20:01 PDT 2000
>Closed-Date:    Mon Oct 23 05:19:53 PDT 2000
>Last-Modified:  Mon Oct 23 05:21:09 PDT 2000
>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:
State-Changed-From-To: open->closed 
State-Changed-By: ru 
State-Changed-When: Mon Oct 23 05:19:53 PDT 2000 
State-Changed-Why:  
Fixed, but why did you remove the (ch == ' ') test in your patch? 

http://www.freebsd.org/cgi/query-pr.cgi?pr=22187 
>Unformatted:
