Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src appease gcc -Wuninitialized on hp700.



details:   https://anonhg.NetBSD.org/src/rev/71942f11b48e
branches:  trunk
changeset: 581794:71942f11b48e
user:      chs <chs%NetBSD.org@localhost>
date:      Sun Jun 05 19:08:28 2005 +0000

description:
appease gcc -Wuninitialized on hp700.

diffstat:

 bin/pax/getoldopt.c                      |   5 +++--
 crypto/dist/heimdal/kadmin/util.c        |   4 +++-
 dist/dhcp/common/execute.c               |   3 ++-
 dist/dhcp/server/ddns.c                  |   5 +++--
 dist/dhcp/server/dhcp.c                  |   4 +++-
 libexec/ld.elf_so/arch/hppa/hppa_reloc.c |  12 +++++++-----
 usr.bin/tail/reverse.c                   |   5 +++--
 usr.sbin/cron/env.c                      |   7 +++++--
 usr.sbin/installboot/bbinfo.c            |   5 +++--
 9 files changed, 32 insertions(+), 18 deletions(-)

diffs (225 lines):

diff -r 70908f60f4e1 -r 71942f11b48e bin/pax/getoldopt.c
--- a/bin/pax/getoldopt.c       Sun Jun 05 19:02:10 2005 +0000
+++ b/bin/pax/getoldopt.c       Sun Jun 05 19:08:28 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: getoldopt.c,v 1.20 2004/06/20 22:20:14 jmc Exp $       */
+/*     $NetBSD: getoldopt.c,v 1.21 2005/06/05 19:08:28 chs Exp $       */
 
 /*
  * Plug-compatible replacement for getopt() for parsing tar-like
@@ -15,7 +15,7 @@
 
 #include <sys/cdefs.h>
 #if !defined(lint)
-__RCSID("$NetBSD: getoldopt.c,v 1.20 2004/06/20 22:20:14 jmc Exp $");
+__RCSID("$NetBSD: getoldopt.c,v 1.21 2005/06/05 19:08:28 chs Exp $");
 #endif /* not lint */
 
 #if HAVE_NBTOOL_CONFIG_H
@@ -51,6 +51,7 @@
                        optind = 2;
        }
 
+       c = '\0';
        if (!use_getopt) {
                c = *key++;
                if (c == '\0') {
diff -r 70908f60f4e1 -r 71942f11b48e crypto/dist/heimdal/kadmin/util.c
--- a/crypto/dist/heimdal/kadmin/util.c Sun Jun 05 19:02:10 2005 +0000
+++ b/crypto/dist/heimdal/kadmin/util.c Sun Jun 05 19:08:28 2005 +0000
@@ -35,7 +35,7 @@
 #include <parse_units.h>
 
 __RCSID("$Heimdal: util.c,v 1.39 2003/04/14 11:55:27 lha Exp $"
-        "$NetBSD: util.c,v 1.1.1.7 2003/05/15 20:28:45 lha Exp $");
+        "$NetBSD: util.c,v 1.2 2005/06/05 19:08:28 chs Exp $");
 
 /*
  * util.c - functions for parsing, unparsing, and editing different
@@ -502,6 +502,8 @@
     is_expr = is_expression(exp);
     if(is_expr)
        ret = kadm5_get_principals(kadm_handle, exp, &princs, &num_princs);
+    else
+       ret = KADM5_FAILURE;
     if(!is_expr || ret == KADM5_AUTH_LIST) {
        /* we might be able to perform the requested opreration even
            if we're not allowed to list principals */
diff -r 70908f60f4e1 -r 71942f11b48e dist/dhcp/common/execute.c
--- a/dist/dhcp/common/execute.c        Sun Jun 05 19:02:10 2005 +0000
+++ b/dist/dhcp/common/execute.c        Sun Jun 05 19:08:28 2005 +0000
@@ -43,7 +43,7 @@
 
 #ifndef lint
 static char copyright[] =
-"$Id: execute.c,v 1.5 2005/06/02 11:10:01 lukem Exp $ Copyright (c) 1998-2002 The Internet Software Consortium.  All rights reserved.\n";
+"$Id: execute.c,v 1.6 2005/06/05 19:08:28 chs Exp $ Copyright (c) 1998-2002 The Internet Software Consortium.  All rights reserved.\n";
 #endif /* not lint */
 
 #include "dhcpd.h"
@@ -352,6 +352,7 @@
                        log_debug ("exec: let %s", r -> data.let.name);
 #endif
                        ns = (struct binding_scope *)0;
+                       binding = (struct binding *)0;
                        binding_scope_allocate (&ns, MDL);
                        e = r;
 
diff -r 70908f60f4e1 -r 71942f11b48e dist/dhcp/server/ddns.c
--- a/dist/dhcp/server/ddns.c   Sun Jun 05 19:02:10 2005 +0000
+++ b/dist/dhcp/server/ddns.c   Sun Jun 05 19:08:28 2005 +0000
@@ -43,7 +43,7 @@
 
 #ifndef lint
 static char copyright[] =
-"$Id: ddns.c,v 1.4 2003/02/18 17:08:44 drochner Exp $ Copyright (c) 2000-2002 The Internet Software Consortium.  All rights reserved.\n";
+"$Id: ddns.c,v 1.5 2005/06/05 19:08:28 chs Exp $ Copyright (c) 2000-2002 The Internet Software Consortium.  All rights reserved.\n";
 #endif /* not lint */
 
 #include "dhcpd.h"
@@ -478,7 +478,8 @@
                                            packet -> options,
                                            state -> options,
                                            &lease -> scope, oc, MDL);
-       
+       else
+               s1 = 0;
        if (oc && s1) {
                /* Buffer length:
                   XXX.XXX.XXX.XXX.<ddns-rev-domain-name>\0 */
diff -r 70908f60f4e1 -r 71942f11b48e dist/dhcp/server/dhcp.c
--- a/dist/dhcp/server/dhcp.c   Sun Jun 05 19:02:10 2005 +0000
+++ b/dist/dhcp/server/dhcp.c   Sun Jun 05 19:08:28 2005 +0000
@@ -43,7 +43,7 @@
 
 #ifndef lint
 static char copyright[] =
-"$Id: dhcp.c,v 1.6 2004/06/11 19:54:02 mellon Exp $ Copyright (c) 1995-2002 The Internet Software Consortium.  All rights reserved.\n";
+"$Id: dhcp.c,v 1.7 2005/06/05 19:08:28 chs Exp $ Copyright (c) 1995-2002 The Internet Software Consortium.  All rights reserved.\n";
 #endif /* not lint */
 
 #include "dhcpd.h"
@@ -2153,6 +2153,8 @@
                                            packet -> options,
                                            (struct option_state *)0,
                                            &global_scope, oc, MDL);
+       else
+               s1 = 0;
        if (oc && s1 &&
            lease -> client_hostname &&
            strlen (lease -> client_hostname) == d1.len &&
diff -r 70908f60f4e1 -r 71942f11b48e libexec/ld.elf_so/arch/hppa/hppa_reloc.c
--- a/libexec/ld.elf_so/arch/hppa/hppa_reloc.c  Sun Jun 05 19:02:10 2005 +0000
+++ b/libexec/ld.elf_so/arch/hppa/hppa_reloc.c  Sun Jun 05 19:08:28 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: hppa_reloc.c,v 1.21 2005/05/21 06:43:39 skrll Exp $    */
+/*     $NetBSD: hppa_reloc.c,v 1.22 2005/06/05 19:08:28 chs Exp $      */
 
 /*-
  * Copyright (c) 2002, 2004 The NetBSD Foundation, Inc.
@@ -111,7 +111,7 @@
 _rtld_relocate_nonplt_self(Elf_Dyn *dynp, Elf_Addr relocbase)
 {
        const Elf_Rela  *relafirst, *rela, *relalim;
-       Elf_Addr        relasz = 0;
+       Elf_Addr        relasz;
        Elf_Addr        where;
        Elf_Addr        *pltgot;
        const Elf_Rela  *plabel_relocs[HPPA_PLABEL_PRE];
@@ -121,11 +121,13 @@
        unsigned long   symnum;
        hppa_plabel     *plabel;
 
-       /* 
-        * Process the DYNAMIC section, looking for the non-PLT
-        * relocations.
+       /*
+        * Process the DYNAMIC section, looking for the non-PLT relocations.
         */ 
        relafirst = NULL;
+       relasz = 0;
+       symtab = NULL;
+       pltgot = NULL;
        for (; dynp->d_tag != DT_NULL; ++dynp) {
                switch (dynp->d_tag) {
 
diff -r 70908f60f4e1 -r 71942f11b48e usr.bin/tail/reverse.c
--- a/usr.bin/tail/reverse.c    Sun Jun 05 19:02:10 2005 +0000
+++ b/usr.bin/tail/reverse.c    Sun Jun 05 19:08:28 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: reverse.c,v 1.16 2004/02/16 21:57:04 itojun Exp $      */
+/*     $NetBSD: reverse.c,v 1.17 2005/06/05 19:08:28 chs Exp $ */
 
 /*-
  * Copyright (c) 1991, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)reverse.c  8.1 (Berkeley) 6/6/93";
 #endif
-__RCSID("$NetBSD: reverse.c,v 1.16 2004/02/16 21:57:04 itojun Exp $");
+__RCSID("$NetBSD: reverse.c,v 1.17 2005/06/05 19:08:28 chs Exp $");
 #endif /* not lint */
 
 #include <sys/param.h>
@@ -194,6 +194,7 @@
                }
 
                /* Fill the block with input data. */
+               ch = 0;
                for (p = tl->l, len = 0;
                    len < BSZ && (ch = getc(fp)) != EOF; ++len)
                        *p++ = ch;
diff -r 70908f60f4e1 -r 71942f11b48e usr.sbin/cron/env.c
--- a/usr.sbin/cron/env.c       Sun Jun 05 19:02:10 2005 +0000
+++ b/usr.sbin/cron/env.c       Sun Jun 05 19:08:28 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: env.c,v 1.13 2005/03/16 02:53:55 xtraeme Exp $ */
+/*     $NetBSD: env.c,v 1.14 2005/06/05 19:08:28 chs Exp $     */
 
 /* Copyright 1988,1990,1993,1994 by Paul Vixie
  * All rights reserved
@@ -22,7 +22,7 @@
 #if 0
 static char rcsid[] = "Id: env.c,v 2.7 1994/01/26 02:25:50 vixie Exp";
 #else
-__RCSID("$NetBSD: env.c,v 1.13 2005/03/16 02:53:55 xtraeme Exp $");
+__RCSID("$NetBSD: env.c,v 1.14 2005/06/05 19:08:28 chs Exp $");
 #endif
 #endif
 
@@ -127,6 +127,9 @@
 
        Debug(DPARS, ("load_env, read <%s>\n", envstr))
 
+       name = NULL;
+       name_end = NULL;
+       s = NULL;
        equal = strchr(envstr, '=');
        if (equal) {
                /*
diff -r 70908f60f4e1 -r 71942f11b48e usr.sbin/installboot/bbinfo.c
--- a/usr.sbin/installboot/bbinfo.c     Sun Jun 05 19:02:10 2005 +0000
+++ b/usr.sbin/installboot/bbinfo.c     Sun Jun 05 19:08:28 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bbinfo.c,v 1.9 2003/10/27 00:12:44 lukem Exp $ */
+/*     $NetBSD: bbinfo.c,v 1.10 2005/06/05 19:08:28 chs Exp $ */
 
 /*-
  * Copyright (c) 1998, 2002 The NetBSD Foundation, Inc.
@@ -42,7 +42,7 @@
 
 #include <sys/cdefs.h>
 #if !defined(__lint)
-__RCSID("$NetBSD: bbinfo.c,v 1.9 2003/10/27 00:12:44 lukem Exp $");
+__RCSID("$NetBSD: bbinfo.c,v 1.10 2005/06/05 19:08:28 chs Exp $");
 #endif /* !__lint */
 
 #include <sys/param.h>
@@ -185,6 +185,7 @@
                            ? le32toh((x)) : be32toh((x)))
 
                /* Look for the bbinfo structure. */
+       bbinfop = NULL;
        for (bbi = 0; bbi < bbparams->maxsize; bbi += sizeof(uint32_t)) {
                bbinfop = (void *) (bb + bbparams->headeroffset + bbi);
                if (memcmp(bbinfop->bbi_magic, bbparams->magic,



Home | Main Index | Thread Index | Old Index