NetBSD Problem Report #8664
Received: (qmail 19050 invoked from network); 22 Oct 1999 02:12:29 -0000
Message-Id: <199910220212.LAA27503@meiko.ics.es.osaka-u.ac.jp>
Date: Fri, 22 Oct 1999 11:12:27 +0900 (JST)
From: h-masuda@ics.es.osaka-u.ac.jp
Reply-To: h-masuda@ics.es.osaka-u.ac.jp
To: gnats-bugs@gnats.netbsd.org
Subject: type mismatch "putchr()" in distrib/utils/more
X-Send-Pr-Version: 3.95
>Number: 8664
>Category: misc
>Synopsis: type mismatch "putchr()" in distrib/utils/more
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: misc-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Oct 21 19:15:00 +0000 1999
>Closed-Date: Fri Oct 22 02:53:55 +0000 1999
>Last-Modified: Fri Oct 22 02:55:00 +0000 1999
>Originator:
>Release: NetBSD-current source 1999/10/20 by sup from sup.jp.netbsd.org
>Organization:
Department of Informatics and Mathematical Science,
Graduate School of Engineering Science, OSAKA UNIVERSITY, JAPAN
>Environment:
System: NetBSD meiko.ics.es.osaka-u.ac.jp 1.4L NetBSD 1.4L (MEIKO.v6) #4: Tue Oct 19 18:03:23 JST 1999 h-masuda@meiko.ics.es.osaka-u.ac.jp:/usr/src/sys/arch/alpha/compile/MEIKO.v6 alpha
>Description:
The 3rd argument of tputs() requires "int (*outc)(int)", but
in screen.c,
tputs(sc_init, sc_height, putchr);
and putchr() function is decleared as "void putchr(int)" in
output.c and extern.h. This is conflict.
(from compiling log)
(snip)
cc -O2 -Werror -I/usr/src/distrib/utils/more -c screen.c
cc1: warnings being treated as errors
screen.c: In function `init':
screen.c:464: warning: passing arg 3 of `tputs' from incompatible pointer type
screen.c: In function `deinit':
screen.c:473: warning: passing arg 3 of `tputs' from incompatible pointer type
screen.c: In function `home':
screen.c:482: warning: passing arg 3 of `tputs' from incompatible pointer type
screen.c: In function `add_line':
screen.c:492: warning: passing arg 3 of `tputs' from incompatible pointer type
screen.c: In function `lower_left':
screen.c:504: warning: passing arg 3 of `tputs' from incompatible pointer type
screen.c: In function `clear':
screen.c:522: warning: passing arg 3 of `tputs' from incompatible pointer type
screen.c: In function `clear_eol':
screen.c:532: warning: passing arg 3 of `tputs' from incompatible pointer type
screen.c: In function `so_enter':
screen.c:541: warning: passing arg 3 of `tputs' from incompatible pointer type
screen.c: In function `so_exit':
screen.c:550: warning: passing arg 3 of `tputs' from incompatible pointer type
screen.c: In function `ul_enter':
screen.c:560: warning: passing arg 3 of `tputs' from incompatible pointer type
screen.c: In function `ul_exit':
screen.c:569: warning: passing arg 3 of `tputs' from incompatible pointer type
screen.c: In function `bo_enter':
screen.c:578: warning: passing arg 3 of `tputs' from incompatible pointer type
screen.c: In function `bo_exit':
screen.c:587: warning: passing arg 3 of `tputs' from incompatible pointer type
screen.c: In function `backspace':
screen.c:600: warning: passing arg 3 of `tputs' from incompatible pointer type
screen.c:602: warning: passing arg 3 of `tputs' from incompatible pointer type
screen.c: In function `putbs':
screen.c:611: warning: passing arg 3 of `tputs' from incompatible pointer type
*** Error code 1
>How-To-Repeat:
(cd distrib/utils/more; make)
>Fix:
Change putchr() from void putchr(int) to int putchr(int) as
following patch.
--- extern.h-ORG Wed Feb 4 21:16:38 1998
+++ extern.h Fri Oct 22 10:54:12 1999
@@ -93,7 +93,7 @@
void put_line __P((void));
void flush __P((void));
void purge __P((void));
-void putchr __P((int));
+int putchr __P((int));
void putstr __P((char *));
void error __P((char *));
void ierror __P((char *));
--- output.c-ORG Wed Feb 4 21:16:42 1998
+++ output.c Fri Oct 22 10:54:23 1999
@@ -163,7 +163,7 @@
/*
* Output a character.
*/
-void
+int
putchr(c)
int c;
{
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed
State-Changed-By: dan
State-Changed-When: Thu Oct 21 19:53:55 PDT 1999
State-Changed-Why:
I checked in the same fix the other day.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.