NetBSD Problem Report #51935

From www@NetBSD.org  Wed Feb  1 17:54:14 2017
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id C6A9A7A287
	for <gnats-bugs@gnats.NetBSD.org>; Wed,  1 Feb 2017 17:54:13 +0000 (UTC)
Message-Id: <20170201175412.D7A637A293@mollari.NetBSD.org>
Date: Wed,  1 Feb 2017 17:54:12 +0000 (UTC)
From: dcb314@hotmail.com
Reply-To: dcb314@hotmail.com
To: gnats-bugs@NetBSD.org
Subject: sys/arch/sun68k/stand/libsa/promdev.c:83: bad call to printf ?
X-Send-Pr-Version: www-1.0

>Number:         51935
>Category:       port-sun3
>Synopsis:       sys/arch/sun68k/stand/libsa/promdev.c:83: bad call to printf ?
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    port-sun3-maintainer
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Feb 01 17:55:00 +0000 2017
>Closed-Date:    Sun Feb 05 09:02:52 +0000 2017
>Last-Modified:  Sun Feb 05 09:02:52 +0000 2017
>Originator:     David Binderman
>Release:        cvs-20170201
>Organization:
>Environment:
>Description:
src/sys/arch/sun68k/stand/libsa/promdev.c:83]: (warning) printf format string requires 1 parameter but 2 are given.

Source code is

        for (i = 0; i < dip->d_stdcount; i++)
            printf("d_stdaddrs[i]=0x%x\n",
                   i, dip->d_stdaddrs[0]);

Maybe better code

        for (i = 0; i < dip->d_stdcount; i++)
            printf("d_stdaddrs[%d]=0x%x\n",
                   i, dip->d_stdaddrs[0]);

>How-To-Repeat:

>Fix:

>Release-Note:

>Audit-Trail:
From: "Christos Zoulas" <christos@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/51935 CVS commit: src/sys/arch/sun68k/stand/libsa
Date: Wed, 1 Feb 2017 13:24:22 -0500

 Module Name:	src
 Committed By:	christos
 Date:		Wed Feb  1 18:24:22 UTC 2017

 Modified Files:
 	src/sys/arch/sun68k/stand/libsa: promdev.c

 Log Message:
 PR/51935: David Binderman: bad call to printf
 - fix debugging printfs in general.
 - KNF


 To generate a diff of this commit:
 cvs rdiff -u -r1.6 -r1.7 src/sys/arch/sun68k/stand/libsa/promdev.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->feedback
State-Changed-By: jakllsch@NetBSD.org
State-Changed-When: Wed, 01 Feb 2017 19:12:52 +0000
State-Changed-Why:
patch was applied


From: David Binderman <dcb314@hotmail.com>
To: "gnats-bugs@gnats.netbsd.org" <gnats-bugs@gnats.netbsd.org>,
	"jakllsch@NetBSD.org" <jakllsch@NetBSD.org>
Cc: 
Subject: Re: port-sun3/51935
Date: Sun, 5 Feb 2017 08:55:58 +0000

 --_000_VI1PR08MB102226382C6C5EC6D66021349C410VI1PR08MB1022eurp_
 Content-Type: text/plain; charset="iso-8859-1"
 Content-Transfer-Encoding: quoted-printable

 Hello there,


 This bug looks fixed to me. I think someone needs to change

 the status from Feedback to Fixed.


 Regards


 David Binderman


 --_000_VI1PR08MB102226382C6C5EC6D66021349C410VI1PR08MB1022eurp_
 Content-Type: text/html; charset="iso-8859-1"
 Content-Transfer-Encoding: quoted-printable

 <html>
 <head>
 <meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Diso-8859-=
 1">
 <style type=3D"text/css" style=3D"display:none;"><!-- P {margin-top:0;margi=
 n-bottom:0;} --></style>
 </head>
 <body dir=3D"ltr">
 <div id=3D"divtagdefaultwrapper" style=3D"font-size:12pt;color:#000000;font=
 -family:Calibri,Arial,Helvetica,sans-serif;" dir=3D"ltr">
 <p>Hello there,</p>
 <p><br>
 </p>
 <p>This bug looks fixed to me. I think someone needs to change</p>
 <p>the status from Feedback to Fixed.</p>
 <p><br>
 </p>
 <p>Regards</p>
 <p><br>
 </p>
 <p>David Binderman</p>
 <p><br>
 </p>
 </div>
 </body>
 </html>

 --_000_VI1PR08MB102226382C6C5EC6D66021349C410VI1PR08MB1022eurp_--

State-Changed-From-To: feedback->closed
State-Changed-By: wiz@NetBSD.org
State-Changed-When: Sun, 05 Feb 2017 09:02:52 +0000
State-Changed-Why:
Confirmed fixed, thanks.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.