Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src appease gcc -Wuninitialized
details: https://anonhg.NetBSD.org/src/rev/c59eb548b437
branches: trunk
changeset: 581418:c59eb548b437
user: lukem <lukem%NetBSD.org@localhost>
date: Wed Jun 01 15:12:18 2005 +0000
description:
appease gcc -Wuninitialized
diffstat:
bin/chio/chio.c | 6 ++++--
bin/expr/expr.y | 8 ++++++--
gnu/usr.sbin/dbsym/dbsym.c | 8 ++++----
3 files changed, 14 insertions(+), 8 deletions(-)
diffs (92 lines):
diff -r f0c9775df698 -r c59eb548b437 bin/chio/chio.c
--- a/bin/chio/chio.c Wed Jun 01 14:57:22 2005 +0000
+++ b/bin/chio/chio.c Wed Jun 01 15:12:18 2005 +0000
@@ -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 <sys/param.h>
@@ -490,6 +490,8 @@
size_t size;
flags = 0;
+ ucount = 0;
+ unit = 0;
have_ucount = 0;
have_unit = 0;
diff -r f0c9775df698 -r c59eb548b437 bin/expr/expr.y
--- a/bin/expr/expr.y Wed Jun 01 14:57:22 2005 +0000
+++ b/bin/expr/expr.y Wed Jun 01 15:12:18 2005 +0000
@@ -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 <sys/cdefs.h>
#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 <sys/types.h>
@@ -181,6 +181,8 @@
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 @@
int64_t res, sign, l, r;
u_int64_t temp;
+ res = 0;
+
if (!is_integer(left)) {
yyerror("non-integer argument '%s'", left);
/* NOTREACHED */
diff -r f0c9775df698 -r c59eb548b437 gnu/usr.sbin/dbsym/dbsym.c
--- a/gnu/usr.sbin/dbsym/dbsym.c Wed Jun 01 14:57:22 2005 +0000
+++ b/gnu/usr.sbin/dbsym/dbsym.c Wed Jun 01 15:12:18 2005 +0000
@@ -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 <sys/param.h>
@@ -340,8 +340,8 @@
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;
Home |
Main Index |
Thread Index |
Old Index