From da1da5baf3a4dfb5535dffc623c104e6c234a603 Mon Sep 17 00:00:00 2001 From: CaS Date: Fri, 22 Mar 2002 17:52:33 +0000 Subject: [PATCH] Fix a few uninitialised variables git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@13216 72102866-910b-0410-8b05-ffd578937521 --- Source/NSPortNameServer.m | 2 +- Source/NSUser.m | 3 +-- Source/callframe.m | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Source/NSPortNameServer.m b/Source/NSPortNameServer.m index 2427172f2..81e288e91 100644 --- a/Source/NSPortNameServer.m +++ b/Source/NSPortNameServer.m @@ -821,7 +821,7 @@ typedef enum { forName: (NSString*)name { NSRunLoop *loop = [NSRunLoop currentRunLoop]; - GSPortCom *com; + GSPortCom *com = nil; unsigned len; NSDate *limit; diff --git a/Source/NSUser.m b/Source/NSUser.m index a98eb74ac..88f0645a8 100644 --- a/Source/NSUser.m +++ b/Source/NSUser.m @@ -280,14 +280,13 @@ setupPathNames() NS_DURING { BOOL warned = NO; - NSDictionary *env; + NSDictionary *env = [[NSProcessInfo processInfo] environment]; [gnustep_global_lock lock]; /* Double-Locking Pattern */ if (gnustep_system_root == nil) { - env = [[NSProcessInfo processInfo] environment]; /* Any of the following might be nil */ gnustep_system_root = [env objectForKey: @"GNUSTEP_SYSTEM_ROOT"]; TEST_RETAIN (gnustep_system_root); diff --git a/Source/callframe.m b/Source/callframe.m index f5319ec70..851014a86 100644 --- a/Source/callframe.m +++ b/Source/callframe.m @@ -47,7 +47,7 @@ callframe_from_info (NSArgumentInfo *info, int numargs, void **retval) { unsigned size = sizeof(callframe_t); unsigned align = __alignof(double); - unsigned offset; + unsigned offset = 0; void *buf; int i; callframe_t *cframe;