Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 25 Jun 2002 03:32:47 +0200 (CEST)
From:      Dan Lukes <dan@obluda.cz>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   bin/39818: cleaning bin/sh code from warnings
Message-ID:  <200206250132.g5P1WlwR053123@xkulesh.vol.cz>

next in thread | raw e-mail | index | archive | help

>Number:         39818
>Category:       bin
>Synopsis:       cleaning sbin/atm code from warnings
>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:   Mon Jun 24 19:10:02 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Dan Lukes
>Release:        FreeBSD 4.6-STABLE i386
>Organization:
Obludarium
>Environment:
System: FreeBSD xkulesh.vol.cz 4.6-STABLE FreeBSD
sbin/atm/fore_dnld/fore_dnld.c,v 1.6.2.2 2000/12/11 01:03:24

>Description:
I want to clean some warnings from code.

sbin/atm/fore_dnld/fore_dnld.c: In function `loadmicrocode':
689: warning: unused variable `cnt'
688: warning: unused variable `n'

'cnt' is really unused, 'n' is used in sun's part of code only
----
/usr/src/sbin/atm/fore_dnld/fore_dnld.c: In function `main':
1341: warning: unsigned int format, u_long arg (arg 2)
1349: warning: unsigned int format, u_long arg (arg 2)
1349: warning: unsigned int format, u_long arg (arg 3)

unsigned LONG's hb1,hb2,hb3 printf'ed as %x

>How-To-Repeat:
	N/A
>Fix:

--- fore_dnld/fore_dnld.c.ORIG  Sat Dec 16 23:44:09 2000
+++ fore_dnld/fore_dnld.c       Tue Jun 25 03:08:51 2002
@@ -684,9 +684,8 @@
                u_long  w;
                char    c[4];
        } w1, w2;
-#endif
        int     n;
-       int     cnt = 0;
+#endif
        u_char  *bufp;
        u_long  *lp;
@@ -1338,7 +1337,7 @@
                                hb3 = CP_READ(Mon->mon_bstat);
                                if (hb3 != BOOT_RUNNING) {
                                        if (verbose)
-                                               printf("bstat %x\n", hb3);
+                                               printf("bstat %lx\n", hb3);
                                        continue;
                                }
@@ -1346,7 +1345,7 @@
                                delay(1);
                                hb2 = CP_READ(aap->aali_heartbeat);
                                if (verbose)
-                                       printf("hb %x %x\n", hb1, hb2);
+                                       printf("hb %lx %lx\n", hb1, hb2);
                                if (hb1 < hb2)
                                        break;
                             }
>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200206250132.g5P1WlwR053123>