mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
Tweaks to avoid compiler warnings.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@9284 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
ea5f1de4c7
commit
8c22ba0878
9 changed files with 21 additions and 21 deletions
|
@ -1564,7 +1564,7 @@ NSDictionary *locale)
|
|||
|
||||
/* The string argument could in fact be `char *' or `wchar_t *'.
|
||||
But this should not make a difference here. */
|
||||
string = (unichar *) args_value[specs[nspecs_done].data_arg].pa_wstring;
|
||||
string = (unichar *) args_value[specs[nspecs_done].data_arg].pa_wstring;
|
||||
|
||||
/* Entry point for printing other strings. */
|
||||
LABEL (print_string):
|
||||
|
@ -1616,6 +1616,7 @@ NSDictionary *locale)
|
|||
int prc;
|
||||
unichar *sp;
|
||||
wchar_t *wsp;
|
||||
|
||||
len = 0;
|
||||
prc = prec;
|
||||
wsp = (wchar_t *)string;
|
||||
|
|
|
@ -331,7 +331,7 @@ static NSLock *urlLock = nil;
|
|||
name = GSFileHandleConnectCompletionNotification;
|
||||
else if (connectionState == writing)
|
||||
name = GSFileHandleWriteCompletionNotification;
|
||||
else if (connectionState == reading)
|
||||
else
|
||||
name = NSFileHandleReadCompletionNotification;
|
||||
|
||||
[nc removeObserver: self name: name object: sock];
|
||||
|
|
|
@ -1755,7 +1755,7 @@ parseCharacterSet(NSString *token)
|
|||
|
||||
- (BOOL) _unfoldHeader
|
||||
{
|
||||
char c;
|
||||
char c = 0;
|
||||
BOOL unwrappingComplete = NO;
|
||||
|
||||
lineStart = lineEnd;
|
||||
|
|
|
@ -2577,23 +2577,21 @@ transmute(ivars self, NSString *aString)
|
|||
withString: (NSString*)aString
|
||||
{
|
||||
int offset;
|
||||
unsigned length;
|
||||
unsigned length = 0;
|
||||
|
||||
GS_RANGE_CHECK(aRange, _count);
|
||||
if (aString == nil)
|
||||
if (aString != nil)
|
||||
{
|
||||
length = 0;
|
||||
if (GSObjCIsInstance(aString) == NO)
|
||||
{
|
||||
[NSException raise: NSInvalidArgumentException
|
||||
format: @"replace characters with non-string"];
|
||||
}
|
||||
else
|
||||
{
|
||||
length = (aString == nil) ? 0 : [aString length];
|
||||
}
|
||||
}
|
||||
else if (GSObjCIsInstance(aString) == NO)
|
||||
{
|
||||
[NSException raise: NSInvalidArgumentException
|
||||
format: @"replace characters with non-string"];
|
||||
}
|
||||
else
|
||||
{
|
||||
length = (aString == nil) ? 0 : [aString length];
|
||||
}
|
||||
|
||||
offset = length - aRange.length;
|
||||
|
||||
if (offset < 0)
|
||||
|
|
|
@ -790,7 +790,7 @@ static NSString *indentStrings[] = {
|
|||
#define STRIDE_FACTOR 3
|
||||
unsigned c,d, stride;
|
||||
BOOL found;
|
||||
NSComparisonResult (*comp)(id, SEL, id);
|
||||
NSComparisonResult (*comp)(id, SEL, id) = 0;
|
||||
int count = numKeys;
|
||||
#ifdef GSWARN
|
||||
BOOL badComparison = NO;
|
||||
|
|
|
@ -580,7 +580,7 @@ typedef enum {
|
|||
NSRunLoop *loop = [NSRunLoop currentRunLoop];
|
||||
struct in_addr singleServer;
|
||||
struct in_addr *svrs = &singleServer;
|
||||
unsigned numSvrs;
|
||||
unsigned numSvrs = 1;
|
||||
unsigned count;
|
||||
unsigned portNum = 0;
|
||||
unsigned len;
|
||||
|
@ -616,7 +616,6 @@ typedef enum {
|
|||
/*
|
||||
* Query a single nameserver - on the local host.
|
||||
*/
|
||||
numSvrs = 1;
|
||||
#ifndef HAVE_INET_ATON
|
||||
svrs->s_addr = inet_addr("127.0.0.1");
|
||||
#else
|
||||
|
@ -938,7 +937,7 @@ typedef enum {
|
|||
- (void) removePortForName: (NSString*)name
|
||||
{
|
||||
NSRunLoop *loop = [NSRunLoop currentRunLoop];
|
||||
GSPortCom *com;
|
||||
GSPortCom *com = nil;
|
||||
unsigned len;
|
||||
NSDate *limit = [NSDate dateWithTimeIntervalSinceNow: timeout];
|
||||
|
||||
|
|
|
@ -159,7 +159,7 @@ serializeToInfo(id object, _NSSerializerInfo* info)
|
|||
{
|
||||
[NSException raise: NSInvalidArgumentException
|
||||
format: @"Class (%@) in property list - expected instance",
|
||||
[c description]];
|
||||
[object description]];
|
||||
}
|
||||
c = GSObjCClass(object);
|
||||
if (GSObjCIsKindOf(c, CStringClass)
|
||||
|
|
|
@ -492,6 +492,7 @@ static NSLock *fileLock = nil;
|
|||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
obj = nil;
|
||||
[fileLock unlock];
|
||||
[localException raise];
|
||||
}
|
||||
|
|
|
@ -319,6 +319,7 @@ static Class NSDataMallocClass;
|
|||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
obj = nil;
|
||||
RELEASE(unarchiver);
|
||||
[localException raise];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue