NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

port-sun3/51935: sys/arch/sun68k/stand/libsa/promdev.c:83: bad call to printf ?



>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:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Feb 01 17:55:00 +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:



Home | Main Index | Thread Index | Old Index