mirror of
https://github.com/gnustep/libs-base.git
synced 2025-06-02 17:41:05 +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
46c331e3e4
commit
b5ae7184db
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 *'.
|
/* The string argument could in fact be `char *' or `wchar_t *'.
|
||||||
But this should not make a difference here. */
|
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. */
|
/* Entry point for printing other strings. */
|
||||||
LABEL (print_string):
|
LABEL (print_string):
|
||||||
|
@ -1616,6 +1616,7 @@ NSDictionary *locale)
|
||||||
int prc;
|
int prc;
|
||||||
unichar *sp;
|
unichar *sp;
|
||||||
wchar_t *wsp;
|
wchar_t *wsp;
|
||||||
|
|
||||||
len = 0;
|
len = 0;
|
||||||
prc = prec;
|
prc = prec;
|
||||||
wsp = (wchar_t *)string;
|
wsp = (wchar_t *)string;
|
||||||
|
|
|
@ -331,7 +331,7 @@ static NSLock *urlLock = nil;
|
||||||
name = GSFileHandleConnectCompletionNotification;
|
name = GSFileHandleConnectCompletionNotification;
|
||||||
else if (connectionState == writing)
|
else if (connectionState == writing)
|
||||||
name = GSFileHandleWriteCompletionNotification;
|
name = GSFileHandleWriteCompletionNotification;
|
||||||
else if (connectionState == reading)
|
else
|
||||||
name = NSFileHandleReadCompletionNotification;
|
name = NSFileHandleReadCompletionNotification;
|
||||||
|
|
||||||
[nc removeObserver: self name: name object: sock];
|
[nc removeObserver: self name: name object: sock];
|
||||||
|
|
|
@ -1755,7 +1755,7 @@ parseCharacterSet(NSString *token)
|
||||||
|
|
||||||
- (BOOL) _unfoldHeader
|
- (BOOL) _unfoldHeader
|
||||||
{
|
{
|
||||||
char c;
|
char c = 0;
|
||||||
BOOL unwrappingComplete = NO;
|
BOOL unwrappingComplete = NO;
|
||||||
|
|
||||||
lineStart = lineEnd;
|
lineStart = lineEnd;
|
||||||
|
|
|
@ -2577,23 +2577,21 @@ transmute(ivars self, NSString *aString)
|
||||||
withString: (NSString*)aString
|
withString: (NSString*)aString
|
||||||
{
|
{
|
||||||
int offset;
|
int offset;
|
||||||
unsigned length;
|
unsigned length = 0;
|
||||||
|
|
||||||
GS_RANGE_CHECK(aRange, _count);
|
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;
|
offset = length - aRange.length;
|
||||||
|
|
||||||
if (offset < 0)
|
if (offset < 0)
|
||||||
|
|
|
@ -790,7 +790,7 @@ static NSString *indentStrings[] = {
|
||||||
#define STRIDE_FACTOR 3
|
#define STRIDE_FACTOR 3
|
||||||
unsigned c,d, stride;
|
unsigned c,d, stride;
|
||||||
BOOL found;
|
BOOL found;
|
||||||
NSComparisonResult (*comp)(id, SEL, id);
|
NSComparisonResult (*comp)(id, SEL, id) = 0;
|
||||||
int count = numKeys;
|
int count = numKeys;
|
||||||
#ifdef GSWARN
|
#ifdef GSWARN
|
||||||
BOOL badComparison = NO;
|
BOOL badComparison = NO;
|
||||||
|
|
|
@ -580,7 +580,7 @@ typedef enum {
|
||||||
NSRunLoop *loop = [NSRunLoop currentRunLoop];
|
NSRunLoop *loop = [NSRunLoop currentRunLoop];
|
||||||
struct in_addr singleServer;
|
struct in_addr singleServer;
|
||||||
struct in_addr *svrs = &singleServer;
|
struct in_addr *svrs = &singleServer;
|
||||||
unsigned numSvrs;
|
unsigned numSvrs = 1;
|
||||||
unsigned count;
|
unsigned count;
|
||||||
unsigned portNum = 0;
|
unsigned portNum = 0;
|
||||||
unsigned len;
|
unsigned len;
|
||||||
|
@ -616,7 +616,6 @@ typedef enum {
|
||||||
/*
|
/*
|
||||||
* Query a single nameserver - on the local host.
|
* Query a single nameserver - on the local host.
|
||||||
*/
|
*/
|
||||||
numSvrs = 1;
|
|
||||||
#ifndef HAVE_INET_ATON
|
#ifndef HAVE_INET_ATON
|
||||||
svrs->s_addr = inet_addr("127.0.0.1");
|
svrs->s_addr = inet_addr("127.0.0.1");
|
||||||
#else
|
#else
|
||||||
|
@ -938,7 +937,7 @@ typedef enum {
|
||||||
- (void) removePortForName: (NSString*)name
|
- (void) removePortForName: (NSString*)name
|
||||||
{
|
{
|
||||||
NSRunLoop *loop = [NSRunLoop currentRunLoop];
|
NSRunLoop *loop = [NSRunLoop currentRunLoop];
|
||||||
GSPortCom *com;
|
GSPortCom *com = nil;
|
||||||
unsigned len;
|
unsigned len;
|
||||||
NSDate *limit = [NSDate dateWithTimeIntervalSinceNow: timeout];
|
NSDate *limit = [NSDate dateWithTimeIntervalSinceNow: timeout];
|
||||||
|
|
||||||
|
|
|
@ -159,7 +159,7 @@ serializeToInfo(id object, _NSSerializerInfo* info)
|
||||||
{
|
{
|
||||||
[NSException raise: NSInvalidArgumentException
|
[NSException raise: NSInvalidArgumentException
|
||||||
format: @"Class (%@) in property list - expected instance",
|
format: @"Class (%@) in property list - expected instance",
|
||||||
[c description]];
|
[object description]];
|
||||||
}
|
}
|
||||||
c = GSObjCClass(object);
|
c = GSObjCClass(object);
|
||||||
if (GSObjCIsKindOf(c, CStringClass)
|
if (GSObjCIsKindOf(c, CStringClass)
|
||||||
|
|
|
@ -492,6 +492,7 @@ static NSLock *fileLock = nil;
|
||||||
}
|
}
|
||||||
NS_HANDLER
|
NS_HANDLER
|
||||||
{
|
{
|
||||||
|
obj = nil;
|
||||||
[fileLock unlock];
|
[fileLock unlock];
|
||||||
[localException raise];
|
[localException raise];
|
||||||
}
|
}
|
||||||
|
|
|
@ -319,6 +319,7 @@ static Class NSDataMallocClass;
|
||||||
}
|
}
|
||||||
NS_HANDLER
|
NS_HANDLER
|
||||||
{
|
{
|
||||||
|
obj = nil;
|
||||||
RELEASE(unarchiver);
|
RELEASE(unarchiver);
|
||||||
[localException raise];
|
[localException raise];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue