kill sprintf

fix unused variables
This commit is contained in:
christos 2014-03-22 01:52:44 +00:00
parent b7fc208426
commit 889cc98cdc
8 changed files with 40 additions and 47 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.241 2013/01/28 16:36:10 rkujawa Exp $ */
/* $NetBSD: machdep.c,v 1.242 2014/03/22 01:52:44 christos Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -50,7 +50,7 @@
#include "empm.h"
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.241 2013/01/28 16:36:10 rkujawa Exp $");
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.242 2014/03/22 01:52:44 christos Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -308,7 +308,7 @@ identifycpu(void)
char machbuf[16];
if (is_draco()) {
sprintf(machbuf, "DraCo rev.%d", is_draco());
snprintf(machbuf, sizeof(machbuf), "DraCo rev.%d", is_draco());
mach = machbuf;
} else
#endif
@ -327,7 +327,7 @@ identifycpu(void)
#ifdef M68060
if (machineid & AMIGA_68060) {
__asm(".word 0x4e7a,0x0808; movl %%d0,%0" : "=d"(pcr) : : "d0");
sprintf(cpubuf, "68%s060 rev.%d",
snprintf(cpubuf, sizeof(cpubuf), "68%s060 rev.%d",
pcr & 0x10000 ? "LC/EC" : "", (pcr>>8)&0xff);
cpu_type = cpubuf;
mmu = "/MMU";
@ -367,7 +367,8 @@ identifycpu(void)
fputype = FPU_NONE;
}
}
sprintf(cpu_model, "%s (%s CPU%s%s)", mach, cpu_type, mmu, fpu);
snprintf(cpu_model, sizeof(cpu_model), "%s (%s CPU%s%s)", mach,
cpu_type, mmu, fpu);
printf("%s\n", cpu_model);
}
@ -820,39 +821,35 @@ int *nofault;
int
badaddr(register void *addr)
{
register int i;
int i;
label_t faultbuf;
#ifdef lint
i = *addr; if (i) return(0);
#endif
nofault = (int *) &faultbuf;
if (setjmp((label_t *)nofault)) {
nofault = (int *) 0;
return(1);
nofault = NULL;
return 1;
}
i = *(volatile short *)addr;
nofault = (int *) 0;
return(0);
__USE(i);
nofault = NULL;
return 0;
}
int
badbaddr(register void *addr)
{
register int i;
int i;
label_t faultbuf;
#ifdef lint
i = *addr; if (i) return(0);
#endif
nofault = (int *) &faultbuf;
if (setjmp((label_t *)nofault)) {
nofault = (int *) 0;
return(1);
nofault = NULL;
return 1;
}
i = *(volatile char *)addr;
nofault = (int *) 0;
return(0);
__USE(i);
nofault = NULL;
return 0;
}
struct isr *isr_ports;

View File

@ -1,4 +1,4 @@
/* $NetBSD: aucc.c,v 1.42 2012/10/27 17:17:27 chs Exp $ */
/* $NetBSD: aucc.c,v 1.43 2014/03/22 01:52:44 christos Exp $ */
/*
* Copyright (c) 1999 Bernardo Innocenti
@ -53,7 +53,7 @@
#if NAUCC > 0
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: aucc.c,v 1.42 2012/10/27 17:17:27 chs Exp $");
__KERNEL_RCSID(0, "$NetBSD: aucc.c,v 1.43 2014/03/22 01:52:44 christos Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -927,9 +927,11 @@ aucc_query_devinfo(void *addr, register mixer_devinfo_t *dip)
dip->type = AUDIO_MIXER_SET;
dip->mixer_class = AUCC_OUTPUT_CLASS;
dip->prev = dip->next = AUDIO_MIXER_LAST;
strcpy(dip->label.name, AudioNspeaker);
#define setname(a) strlcpy(dip->label.name, (a), sizeof(dip->label.name))
setname(AudioNspeaker);
for (i = 0; i < 16; i++) {
sprintf(dip->un.s.member[i].label.name,
snprintf(dip->un.s.member[i].label.name,
sizeof(dip->un.s.member[i].label.name),
"channelmask%d", i);
dip->un.s.member[i].mask = i;
}
@ -940,7 +942,7 @@ aucc_query_devinfo(void *addr, register mixer_devinfo_t *dip)
dip->type = AUDIO_MIXER_VALUE;
dip->mixer_class = AUCC_OUTPUT_CLASS;
dip->prev = dip->next = AUDIO_MIXER_LAST;
strcpy(dip->label.name, AudioNmaster);
setname(AudioNmaster);
dip->un.v.num_channels = 4;
strcpy(dip->un.v.units.name, AudioNvolume);
break;
@ -949,7 +951,7 @@ aucc_query_devinfo(void *addr, register mixer_devinfo_t *dip)
dip->type = AUDIO_MIXER_CLASS;
dip->mixer_class = AUCC_OUTPUT_CLASS;
dip->next = dip->prev = AUDIO_MIXER_LAST;
strcpy(dip->label.name, AudioCoutputs);
setname(AudioCoutputs);
break;
default:

View File

@ -1,4 +1,4 @@
/* $NetBSD: drsc.c,v 1.32 2012/10/27 17:17:28 chs Exp $ */
/* $NetBSD: drsc.c,v 1.33 2014/03/22 01:52:44 christos Exp $ */
/*
* Copyright (c) 1996 Ignatios Souvatzis
@ -59,7 +59,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: drsc.c,v 1.32 2012/10/27 17:17:28 chs Exp $");
__KERNEL_RCSID(0, "$NetBSD: drsc.c,v 1.33 2014/03/22 01:52:44 christos Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -115,15 +115,12 @@ void
drscattach(device_t parent, device_t self, void *aux)
{
struct siop_softc *sc = device_private(self);
struct zbus_args *zap;
siop_regmap_p rp;
struct scsipi_adapter *adapt = &sc->sc_adapter;
struct scsipi_channel *chan = &sc->sc_channel;
printf("\n");
zap = aux;
sc->sc_dev = self;
sc->sc_siopp = rp = (siop_regmap_p)(DRCCADDR+PAGE_SIZE*DRSCSIPG);

View File

@ -1,4 +1,4 @@
/* $NetBSD: ite.c,v 1.96 2014/03/16 05:20:22 dholland Exp $ */
/* $NetBSD: ite.c,v 1.97 2014/03/22 01:52:44 christos Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -46,7 +46,7 @@
#include "opt_ddb.h"
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ite.c,v 1.96 2014/03/16 05:20:22 dholland Exp $");
__KERNEL_RCSID(0, "$NetBSD: ite.c,v 1.97 2014/03/22 01:52:44 christos Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@ -1642,7 +1642,8 @@ iteputchar(register int c, struct ite_softc *ip)
break;
case 6:
/* cursor position report */
sprintf(ip->argbuf, "\033[%d;%dR",
snprintf(ip->argbuf, sizeof(ip->argbuf),
"\033[%d;%dR",
ip->cury + 1, ip->curx + 1);
ite_sendstr(ip->argbuf);
break;

View File

@ -1,4 +1,4 @@
/* $NetBSD: em4k.c,v 1.2 2013/01/29 21:02:50 rkujawa Exp $ */
/* $NetBSD: em4k.c,v 1.3 2014/03/22 01:52:44 christos Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@ -314,9 +314,6 @@ em4k_pci_conf_read(pci_chipset_tag_t pc, pcitag_t tag, int reg)
{
uint32_t data;
uint32_t bus, dev, func;
struct em4k_softc *sc;
sc = pc->cookie;
pci_decompose_tag(pc, tag, &bus, &dev, &func);
@ -335,9 +332,6 @@ void
em4k_pci_conf_write(pci_chipset_tag_t pc, pcitag_t tag, int reg, pcireg_t val)
{
uint32_t bus, dev, func;
struct em4k_softc *sc;
sc = pc->cookie;
pci_decompose_tag(pc, tag, &bus, &dev, &func);

View File

@ -1,4 +1,4 @@
/* $NetBSD: p5pb.c,v 1.12 2012/10/27 17:17:34 chs Exp $ */
/* $NetBSD: p5pb.c,v 1.13 2014/03/22 01:52:44 christos Exp $ */
/*-
* Copyright (c) 2011, 2012 The NetBSD Foundation, Inc.
@ -321,6 +321,7 @@ p5pb_find_resources(struct p5pb_softc *sc)
void
p5pb_set_props(struct p5pb_softc *sc)
{
#if NGENFB > 0
prop_dictionary_t dict;
device_t dev;
@ -328,7 +329,6 @@ p5pb_set_props(struct p5pb_softc *sc)
dict = device_properties(dev);
/* genfb needs additional properties, like virtual, physical address */
#if (NGENFB > 0)
/* XXX: currently genfb is supported only on CVPPC/BVPPC */
prop_dictionary_set_uint64(dict, "virtual_address",
sc->pci_mem_area.base);

View File

@ -1,4 +1,4 @@
/* $NetBSD: pci_machdep.c,v 1.1 2011/09/19 19:15:29 rkujawa Exp $ */
/* $NetBSD: pci_machdep.c,v 1.2 2014/03/22 01:52:44 christos Exp $ */
/*-
* Copyright (c) 2011 The NetBSD Foundation, Inc.
@ -101,7 +101,7 @@ amiga_pci_intr_string(pci_chipset_tag_t pc, pci_intr_handle_t ih)
{
static char str[10];
sprintf(str, "INT%d", (int) ih);
snprintf(str, sizeof(str), "INT%d", (int) ih);
return str;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: printf.s,v 1.8 2008/04/28 20:23:13 martin Exp $ */
/* $NetBSD: printf.s,v 1.9 2014/03/22 01:52:44 christos Exp $ */
/*-
* Copyright (c) 1996,2006 The NetBSD Foundation, Inc.
@ -56,6 +56,7 @@ Lstorech:
movb %d0, %a3@+
rts
#ifdef notdef
ENTRY_NOPROFILE(sprintf)
movml #0x0032,%sp@-
movl %sp@(16),%a3
@ -66,6 +67,7 @@ ENTRY_NOPROFILE(sprintf)
jsr %a6@(-0x20a)
movml %sp@+, #0x4c00
rts
#endif
/*
* XXX cheating - at least for now.