Source-Changes-HG archive

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

[src/trunk]: src/crypto/dist/ssh Appease gcc -Wuninitialized, in a similar me...



details:   https://anonhg.NetBSD.org/src/rev/be53689ba1fc
branches:  trunk
changeset: 581492:be53689ba1fc
user:      lukem <lukem%NetBSD.org@localhost>
date:      Thu Jun 02 04:43:45 2005 +0000

description:
Appease gcc -Wuninitialized, in a similar method used elsewhere in the
same function.

diffstat:

 crypto/dist/ssh/readconf.c |  6 ++++--
 crypto/dist/ssh/servconf.c |  5 +++--
 2 files changed, 7 insertions(+), 4 deletions(-)

diffs (60 lines):

diff -r 823c364a4b70 -r be53689ba1fc crypto/dist/ssh/readconf.c
--- a/crypto/dist/ssh/readconf.c        Thu Jun 02 04:40:46 2005 +0000
+++ b/crypto/dist/ssh/readconf.c        Thu Jun 02 04:43:45 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: readconf.c,v 1.25 2005/05/18 16:11:11 christos Exp $   */
+/*     $NetBSD: readconf.c,v 1.26 2005/06/02 04:43:45 lukem Exp $      */
 /*
  * Author: Tatu Ylonen <ylo%cs.hut.fi@localhost>
  * Copyright (c) 1995 Tatu Ylonen <ylo%cs.hut.fi@localhost>, Espoo, Finland
@@ -14,7 +14,7 @@
 
 #include "includes.h"
 RCSID("$OpenBSD: readconf.c,v 1.137 2005/03/04 08:48:06 djm Exp $");
-__RCSID("$NetBSD: readconf.c,v 1.25 2005/05/18 16:11:11 christos Exp $");
+__RCSID("$NetBSD: readconf.c,v 1.26 2005/06/02 04:43:45 lukem Exp $");
 
 #include "ssh.h"
 #include "xmalloc.h"
@@ -758,6 +758,7 @@
                arg = strdelim(&s);
                if (!arg || *arg == '\0')
                        fatal("%.200s line %d: Missing argument.", filename, linenum);
+               value = 0;      /* To avoid compiler warning... */
                if (arg[0] == '^' && arg[2] == 0 &&
                    (u_char) arg[1] >= 64 && (u_char) arg[1] < 128)
                        value = (u_char) arg[1] & 31;
@@ -778,6 +779,7 @@
        case oAddressFamily:
                arg = strdelim(&s);
                intptr = &options->address_family;
+               value = 0;      /* To avoid compiler warning... */
                if (strcasecmp(arg, "inet") == 0)
                        value = AF_INET;
                else if (strcasecmp(arg, "inet6") == 0)
diff -r 823c364a4b70 -r be53689ba1fc crypto/dist/ssh/servconf.c
--- a/crypto/dist/ssh/servconf.c        Thu Jun 02 04:40:46 2005 +0000
+++ b/crypto/dist/ssh/servconf.c        Thu Jun 02 04:43:45 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: servconf.c,v 1.31 2005/04/23 16:53:28 christos Exp $   */
+/*     $NetBSD: servconf.c,v 1.32 2005/06/02 04:52:25 lukem Exp $      */
 /*
  * Copyright (c) 1995 Tatu Ylonen <ylo%cs.hut.fi@localhost>, Espoo, Finland
  *                    All rights reserved
@@ -12,7 +12,7 @@
 
 #include "includes.h"
 RCSID("$OpenBSD: servconf.c,v 1.139 2005/03/01 10:09:52 djm Exp $");
-__RCSID("$NetBSD: servconf.c,v 1.31 2005/04/23 16:53:28 christos Exp $");
+__RCSID("$NetBSD: servconf.c,v 1.32 2005/06/02 04:52:25 lukem Exp $");
 
 #ifdef KRB4
 #include <krb.h>
@@ -562,6 +562,7 @@
                if (options->listen_addrs != NULL)
                        fatal("%s line %d: address family must be specified before "
                            "ListenAddress.", filename, linenum);
+               value = 0;      /* silence compiler */
                if (strcasecmp(arg, "inet") == 0)
                        value = AF_INET;
                else if (strcasecmp(arg, "inet6") == 0)



Home | Main Index | Thread Index | Old Index