From 5760da639354a61d45803a4c9d5e3a275daad5c1 Mon Sep 17 00:00:00 2001 From: lukem Date: Wed, 1 Jun 2005 15:12:18 +0000 Subject: [PATCH] appease gcc -Wuninitialized --- bin/chio/chio.c | 6 ++++-- bin/expr/expr.y | 8 ++++++-- gnu/usr.sbin/dbsym/dbsym.c | 8 ++++---- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/bin/chio/chio.c b/bin/chio/chio.c index 9821fb7f0dfd..1faed4fbe901 100644 --- a/bin/chio/chio.c +++ b/bin/chio/chio.c @@ -1,4 +1,4 @@ -/* $NetBSD: chio.c,v 1.26 2004/10/29 19:51:36 dsl Exp $ */ +/* $NetBSD: chio.c,v 1.27 2005/06/01 15:20:04 lukem Exp $ */ /*- * Copyright (c) 1996, 1998, 1999 The NetBSD Foundation, Inc. @@ -46,7 +46,7 @@ __COPYRIGHT( "@(#) Copyright (c) 1996, 1998, 1999\ The NetBSD Foundation, Inc. All rights reserved."); -__RCSID("$NetBSD: chio.c,v 1.26 2004/10/29 19:51:36 dsl Exp $"); +__RCSID("$NetBSD: chio.c,v 1.27 2005/06/01 15:20:04 lukem Exp $"); #endif #include @@ -490,6 +490,8 @@ do_status(const char *cname, int argc, char **argv) size_t size; flags = 0; + ucount = 0; + unit = 0; have_ucount = 0; have_unit = 0; diff --git a/bin/expr/expr.y b/bin/expr/expr.y index 5a5643581a8d..acfa1de6e84c 100644 --- a/bin/expr/expr.y +++ b/bin/expr/expr.y @@ -1,4 +1,4 @@ -/* $NetBSD: expr.y,v 1.31 2004/04/20 19:44:51 jdolecek Exp $ */ +/* $NetBSD: expr.y,v 1.32 2005/06/01 15:21:52 lukem Exp $ */ /*_ * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -38,7 +38,7 @@ %{ #include #ifndef lint -__RCSID("$NetBSD: expr.y,v 1.31 2004/04/20 19:44:51 jdolecek Exp $"); +__RCSID("$NetBSD: expr.y,v 1.32 2005/06/01 15:21:52 lukem Exp $"); #endif /* not lint */ #include @@ -181,6 +181,8 @@ expr: item { $$ = $1; } int64_t l, r; int res; + res = 0; + /* * Slight hack to avoid differences in the compare code * between string and numeric compare. @@ -274,6 +276,8 @@ perform_arith_op(const char *left, const char *op, const char *right) int64_t res, sign, l, r; u_int64_t temp; + res = 0; + if (!is_integer(left)) { yyerror("non-integer argument '%s'", left); /* NOTREACHED */ diff --git a/gnu/usr.sbin/dbsym/dbsym.c b/gnu/usr.sbin/dbsym/dbsym.c index 89e4d10a33b6..57c6ffb3d3fb 100644 --- a/gnu/usr.sbin/dbsym/dbsym.c +++ b/gnu/usr.sbin/dbsym/dbsym.c @@ -1,4 +1,4 @@ -/* $NetBSD: dbsym.c,v 1.7 2003/10/27 00:12:41 lukem Exp $ */ +/* $NetBSD: dbsym.c,v 1.8 2005/06/01 15:12:18 lukem Exp $ */ /* * Copyright (c) 2001 Simon Burge (for Wasabi Systems) @@ -39,7 +39,7 @@ __COPYRIGHT( "@(#) Copyright (c) 1996 Christopher G. Demetriou, 2001 Simon Burge.\ All rights reserved.\n"); -__RCSID("$NetBSD: dbsym.c,v 1.7 2003/10/27 00:12:41 lukem Exp $"); +__RCSID("$NetBSD: dbsym.c,v 1.8 2005/06/01 15:12:18 lukem Exp $"); #endif /* not lint */ #include @@ -340,8 +340,8 @@ int load_symtab(bfd *abfd, int fd, char **symtab, u_int32_t *symtabsize) { elf_ehdr ehdr; - Elf32_External_Shdr *s32hdr; - Elf64_External_Shdr *s64hdr; + Elf32_External_Shdr *s32hdr = NULL; + Elf64_External_Shdr *s64hdr = NULL; void *shdr; u_int32_t osymtabsize, sh_offset; int elftype, e_shnum, i, sh_size;