Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/x86/x86 Fix uninitialised variable warning from cla...



details:   https://anonhg.NetBSD.org/src/rev/f9a337c5f20b
branches:  trunk
changeset: 782305:f9a337c5f20b
user:      joerg <joerg%NetBSD.org@localhost>
date:      Sat Oct 27 07:19:45 2012 +0000

description:
Fix uninitialised variable warning from clang by removing the variable
used in first place.

diffstat:

 sys/arch/x86/x86/powernow.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (36 lines):

diff -r 4cdd231cb673 -r f9a337c5f20b sys/arch/x86/x86/powernow.c
--- a/sys/arch/x86/x86/powernow.c       Sat Oct 27 06:55:54 2012 +0000
+++ b/sys/arch/x86/x86/powernow.c       Sat Oct 27 07:19:45 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: powernow.c,v 1.6 2012/07/18 21:55:05 joerg Exp $ */
+/*     $NetBSD: powernow.c,v 1.7 2012/10/27 07:19:45 joerg Exp $ */
 /*     $OpenBSD: powernow-k8.c,v 1.8 2006/06/16 05:58:50 gwk Exp $ */
 
 /*-
@@ -57,7 +57,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: powernow.c,v 1.6 2012/07/18 21:55:05 joerg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: powernow.c,v 1.7 2012/10/27 07:19:45 joerg Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -378,7 +378,7 @@
        struct powernow_softc *sc = device_private(self);
        uint32_t currentfid, maxfid, mhz, startvid;
        uint64_t status;
-       int i, rv, len;
+       int i, rv;
        char tmp[6];
 
        sc->sc_state = kmem_alloc(sizeof(*sc->sc_state), KM_SLEEP);
@@ -428,7 +428,7 @@
                        sc->sc_state->state_table[i].fid,
                        sc->sc_state->state_table[i].vid));
 
-               len += snprintf(tmp, sizeof(tmp), "%d%s",
+               snprintf(tmp, sizeof(tmp), "%d%s",
                    sc->sc_state->state_table[i].freq,
                    i < sc->sc_state->n_states - 1 ? " " : "");
 



Home | Main Index | Thread Index | Old Index