Fix up some unitialised variables.

This commit is contained in:
chris 2003-10-26 23:11:15 +00:00
parent 3d29fcd1f7
commit 25c741b8a6
5 changed files with 18 additions and 13 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: syscall.c,v 1.20 2003/10/08 00:28:41 thorpej Exp $ */
/* $NetBSD: syscall.c,v 1.21 2003/10/26 23:11:15 chris Exp $ */
/*-
* Copyright (c) 2000, 2003 The NetBSD Foundation, Inc.
@ -82,7 +82,7 @@
#include <sys/param.h>
__KERNEL_RCSID(0, "$NetBSD: syscall.c,v 1.20 2003/10/08 00:28:41 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: syscall.c,v 1.21 2003/10/26 23:11:15 chris Exp $");
#include <sys/device.h>
#include <sys/errno.h>
@ -336,6 +336,8 @@ syscall_fancy(struct trapframe *frame, struct lwp *l, u_int32_t insn)
register_t *ap, *args, copyargs[MAXARGS], rval[2];
ksiginfo_t ksi;
args = NULL;
KERNEL_PROC_LOCK(p);
switch (insn & SWI_OS_MASK) { /* Which OS is the SWI from? */

View File

@ -1,4 +1,4 @@
/* $NetBSD: bus_dma.c,v 1.35 2003/09/06 09:46:37 rearnsha Exp $ */
/* $NetBSD: bus_dma.c,v 1.36 2003/10/26 23:11:15 chris Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@ -40,7 +40,7 @@
#define _ARM32_BUS_DMA_PRIVATE
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.35 2003/09/06 09:46:37 rearnsha Exp $");
__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.36 2003/10/26 23:11:15 chris Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -673,7 +673,7 @@ _bus_dmamem_alloc(bus_dma_tag_t t, bus_size_t size, bus_size_t alignment,
int flags)
{
struct arm32_dma_range *dr;
int error, i;
int error = 0, i;
#ifdef DEBUG_DMA
printf("dmamem_alloc t=%p size=%lx align=%lx boundary=%lx "

View File

@ -1,4 +1,4 @@
/* $NetBSD: cpu.c,v 1.53 2003/09/06 09:42:12 rearnsha Exp $ */
/* $NetBSD: cpu.c,v 1.54 2003/10/26 23:11:15 chris Exp $ */
/*
* Copyright (c) 1995 Mark Brinicombe.
@ -46,7 +46,7 @@
#include <sys/param.h>
__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.53 2003/09/06 09:42:12 rearnsha Exp $");
__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.54 2003/10/26 23:11:15 chris Exp $");
#include <sys/systm.h>
#include <sys/malloc.h>
@ -399,7 +399,7 @@ void
identify_arm_cpu(struct device *dv, struct cpu_info *ci)
{
u_int cpuid;
enum cpu_class cpu_class;
enum cpu_class cpu_class = CPU_CLASS_NONE;
int i;
cpuid = ci->ci_arm_cpuid;

View File

@ -1,4 +1,4 @@
/* $NetBSD: db_interface.c,v 1.33 2003/08/25 04:51:10 mrg Exp $ */
/* $NetBSD: db_interface.c,v 1.34 2003/10/26 23:11:15 chris Exp $ */
/*
* Copyright (c) 1996 Scott K. Stevens
@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.33 2003/08/25 04:51:10 mrg Exp $");
__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.34 2003/10/26 23:11:15 chris Exp $");
#include "opt_ddb.h"
#include "opt_kgdb.h"
@ -233,6 +233,9 @@ db_write_text(vaddr_t addr, size_t size, char *data)
size_t limit, savesize;
char *dst;
/* XXX: gcc */
oldpte = 0;
if ((savesize = size) == 0)
return;

View File

@ -1,4 +1,4 @@
/* $NetBSD: pmap.c,v 1.141 2003/10/13 20:50:34 scw Exp $ */
/* $NetBSD: pmap.c,v 1.142 2003/10/26 23:11:15 chris Exp $ */
/*
* Copyright 2003 Wasabi Systems, Inc.
@ -212,7 +212,7 @@
#include <machine/param.h>
#include <arm/arm32/katelib.h>
__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.141 2003/10/13 20:50:34 scw Exp $");
__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.142 2003/10/26 23:11:15 chris Exp $");
#ifdef PMAP_DEBUG
@ -4979,7 +4979,6 @@ pmap_dump(pmap_t pm)
pt_entry_t *ptep, pte;
vaddr_t l2_va, l2b_va, va;
int i, j, k, occ, rows = 0;
char ch;
if (pm == pmap_kernel())
printf("pmap_kernel (%p): ", pm);
@ -5011,6 +5010,7 @@ pmap_dump(pmap_t pm)
occ = l2b->l2b_occupancy;
va = l2b_va + (k * 4096);
for (; k < 256; k++, va += 0x1000) {
char ch = ' ';
if ((k % 64) == 0) {
if ((rows % 8) == 0) {
printf(