summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authored <ed@FreeBSD.org>2010-01-02 10:14:35 +0000
committered <ed@FreeBSD.org>2010-01-02 10:14:35 +0000
commit14b790b0cfcd233769de066dd78e637bf80713dc (patch)
treec2c2339d73799eb2c006fdef9e21fdd916ff5c96
parent0db0a6763d69dfad476e262e21fe33bc924763ee (diff)
downloadFreeBSD-src-14b790b0cfcd233769de066dd78e637bf80713dc.zip
FreeBSD-src-14b790b0cfcd233769de066dd78e637bf80713dc.tar.gz
Mute some warnings on uninitialized variables.
The code does the right thing, but the compiler is unable to figure it out. All paths that use that variable use the same invariant.
-rw-r--r--usr.bin/passwd/passwd.c2
-rw-r--r--usr.bin/sockstat/sockstat.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/passwd/passwd.c b/usr.bin/passwd/passwd.c
index d35458c..2d399c5 100644
--- a/usr.bin/passwd/passwd.c
+++ b/usr.bin/passwd/passwd.c
@@ -67,7 +67,7 @@ int
main(int argc, char *argv[])
{
char hostname[MAXHOSTNAMELEN];
- struct passwd *pwd;
+ struct passwd *pwd = NULL; /* Keep compiler happy. */
int o, pam_err;
uid_t uid;
diff --git a/usr.bin/sockstat/sockstat.c b/usr.bin/sockstat/sockstat.c
index 1b2f141..1a5af42 100644
--- a/usr.bin/sockstat/sockstat.c
+++ b/usr.bin/sockstat/sockstat.c
@@ -496,8 +496,8 @@ printaddr(int af, struct sockaddr_storage *ss)
{
char addrstr[INET6_ADDRSTRLEN] = { '\0', '\0' };
struct sockaddr_un *sun;
- void *addr;
- int off, port;
+ void *addr = NULL; /* Keep compiler happy. */
+ int off, port = 0;
switch (af) {
case AF_INET:
OpenPOWER on IntegriCloud