Module Name: src
Committed By: joerg
Date: Sat Oct 27 07:19:45 UTC 2012
Modified Files:
src/sys/arch/x86/x86: powernow.c
Log Message:
Fix uninitialised variable warning from clang by removing the variable
used in first place.
To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/x86/x86/powernow.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/x86/x86/powernow.c
diff -u src/sys/arch/x86/x86/powernow.c:1.6 src/sys/arch/x86/x86/powernow.c:1.7
--- src/sys/arch/x86/x86/powernow.c:1.6 Wed Jul 18 21:55:05 2012
+++ src/sys/arch/x86/x86/powernow.c Sat Oct 27 07:19:45 2012
@@ -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 @@ powernow_k7_init(device_t self)
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 @@ powernow_k7_init(device_t self)
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 ? " " : "");