Module Name: src
Committed By: macallan
Date: Tue Nov 19 06:37:42 UTC 2013
Modified Files:
src/sys/dev/pci: voodoofb.c
Log Message:
(hopefully) shut up warnings about set-but-unused variables.
To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/sys/dev/pci/voodoofb.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/dev/pci/voodoofb.c
diff -u src/sys/dev/pci/voodoofb.c:1.46 src/sys/dev/pci/voodoofb.c:1.47
--- src/sys/dev/pci/voodoofb.c:1.46 Wed Oct 9 17:18:23 2013
+++ src/sys/dev/pci/voodoofb.c Tue Nov 19 06:37:42 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: voodoofb.c,v 1.46 2013/10/09 17:18:23 macallan Exp $ */
+/* $NetBSD: voodoofb.c,v 1.47 2013/11/19 06:37:42 macallan Exp $ */
/*
* Copyright (c) 2005, 2006, 2012 Michael Lorenz
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: voodoofb.c,v 1.46 2013/10/09 17:18:23 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: voodoofb.c,v 1.47 2013/11/19 06:37:42 macallan Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -296,10 +296,9 @@ voodoo3_write_gra(struct voodoofb_softc
static inline void
voodoo3_write_attr(struct voodoofb_softc *sc, uint8_t reg, uint8_t val)
{
- volatile uint8_t junk;
uint8_t index;
- junk = bus_space_read_1(sc->sc_ioregt, sc->sc_ioregh, IS1_R - 0x300);
+ (void)bus_space_read_1(sc->sc_ioregt, sc->sc_ioregh, IS1_R - 0x300);
index = bus_space_read_1(sc->sc_ioregt, sc->sc_ioregh, ATT_IW - 0x300);
bus_space_write_1(sc->sc_ioregt, sc->sc_ioregh, ATT_IW - 0x300, reg);
bus_space_write_1(sc->sc_ioregt, sc->sc_ioregh, ATT_IW - 0x300, val);
@@ -363,7 +362,7 @@ voodoofb_attach(device_t parent, device_
const char *intrstr;
#endif
ulong defattr;
- int console, width, height, i, j;
+ int console, width, height, i;
prop_dictionary_t dict;
int linebytes, depth, flags;
uint32_t bg, fg, ul;
@@ -479,7 +478,6 @@ voodoofb_attach(device_t parent, device_
printf("fb: %08lx\n", (ulong)ri->ri_bits);
#endif
- j = 0;
if (sc->sc_bits_per_pixel == 8) {
uint8_t tmp;
for (i = 0; i < 256; i++) {
@@ -1029,9 +1027,8 @@ static void
voodoofb_rectfill(struct voodoofb_softc *sc, int x, int y, int width,
int height, int colour)
{
- uint32_t fmt, col;
+ uint32_t fmt;
- col = (colour << 24) | (colour << 16) | (colour << 8) | colour;
fmt = sc->sc_linebytes | ((sc->sc_bits_per_pixel +
((sc->sc_bits_per_pixel == 8) ? 0 : 8)) << 13);
@@ -1542,7 +1539,7 @@ voodoofb_set_videomode(struct voodoofb_s
{
uint32_t miscinit0 = 0;
int vidpll, fout;
- uint32_t vp, vidproc = VIDPROCDEFAULT;
+ uint32_t vidproc = VIDPROCDEFAULT;
uint32_t bpp = 1; /* for now */
uint32_t bytes_per_row = vm->hdisplay * bpp;
@@ -1552,7 +1549,6 @@ voodoofb_set_videomode(struct voodoofb_s
sc->sc_linebytes = bytes_per_row;
voodoofb_setup_monitor(sc, vm);
- vp = voodoo3_read32(sc, VIDPROCCFG);
vidproc &= ~(0x1c0000); /* clear bits 18 to 20, bpp in vidproccfg */
/* enable bits 18 to 20 to the required bpp */
@@ -1561,6 +1557,8 @@ voodoofb_set_videomode(struct voodoofb_s
vidpll = voodoofb_calc_pll(vm->dot_clock, &fout, 0);
#ifdef VOODOOFB_DEBUG
+ uint32_t vp;
+ vp = voodoo3_read32(sc, VIDPROCCFG);
printf("old vidproc: %08x\n", vp);
printf("pll: %08x %d\n", vidpll, fout);
#endif