mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 00:30:53 +00:00
* Source/NSUserDefaults.m:
* Source/NSConnection.m: * Source/NSCharacterSet.m: * Tools/make_strings/StringsFile.m: * Tools/pl.m: Fix instances where NSNotFound is stored in or compared to an unsigned or int variable. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34884 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
1a6c14af38
commit
4e97f9028e
6 changed files with 33 additions and 24 deletions
|
@ -1,3 +1,12 @@
|
||||||
|
2012-03-05 Eric Wasylishen <ewasylishen@gmail.com>
|
||||||
|
|
||||||
|
* Source/NSUserDefaults.m:
|
||||||
|
* Source/NSConnection.m:
|
||||||
|
* Source/NSCharacterSet.m:
|
||||||
|
* Tools/make_strings/StringsFile.m:
|
||||||
|
* Tools/pl.m: Fix instances where NSNotFound is stored in or
|
||||||
|
compared to an unsigned or int variable.
|
||||||
|
|
||||||
2012-03-05 Eric Wasylishen <ewasylishen@gmail.com>
|
2012-03-05 Eric Wasylishen <ewasylishen@gmail.com>
|
||||||
|
|
||||||
* Source/NSString.m: Factor out code for opening an ICU collator
|
* Source/NSString.m: Factor out code for opening an ICU collator
|
||||||
|
|
|
@ -332,10 +332,10 @@
|
||||||
length = [aString length];
|
length = [aString length];
|
||||||
if (length > 0)
|
if (length > 0)
|
||||||
{
|
{
|
||||||
unsigned i;
|
NSUInteger i;
|
||||||
unichar (*get)(id, SEL, unsigned);
|
unichar (*get)(id, SEL, NSUInteger);
|
||||||
|
|
||||||
get = (unichar (*)(id, SEL, unsigned))
|
get = (unichar (*)(id, SEL, NSUInteger))
|
||||||
[aString methodForSelector: @selector(characterAtIndex:)];
|
[aString methodForSelector: @selector(characterAtIndex:)];
|
||||||
for (i = 0; i < length; i++)
|
for (i = 0; i < length; i++)
|
||||||
{
|
{
|
||||||
|
@ -502,10 +502,10 @@
|
||||||
length = [aString length];
|
length = [aString length];
|
||||||
if (length > 0)
|
if (length > 0)
|
||||||
{
|
{
|
||||||
unsigned i;
|
NSUInteger i;
|
||||||
unichar (*get)(id, SEL, unsigned);
|
unichar (*get)(id, SEL, NSUInteger);
|
||||||
|
|
||||||
get = (unichar (*)(id, SEL, unsigned))
|
get = (unichar (*)(id, SEL, NSUInteger))
|
||||||
[aString methodForSelector: @selector(characterAtIndex:)];
|
[aString methodForSelector: @selector(characterAtIndex:)];
|
||||||
|
|
||||||
for (i = 0; i < length; i++)
|
for (i = 0; i < length; i++)
|
||||||
|
@ -1227,7 +1227,7 @@ static Class concreteMutableClass = nil;
|
||||||
{
|
{
|
||||||
NSMutableBitmapCharSet *tmp;
|
NSMutableBitmapCharSet *tmp;
|
||||||
NSData *result;
|
NSData *result;
|
||||||
unsigned index = 0;
|
NSUInteger index = 0;
|
||||||
|
|
||||||
tmp = [NSMutableBitmapCharSet new];
|
tmp = [NSMutableBitmapCharSet new];
|
||||||
while ((index = [indexes indexGreaterThanOrEqualToIndex: index])
|
while ((index = [indexes indexGreaterThanOrEqualToIndex: index])
|
||||||
|
@ -1276,7 +1276,7 @@ static Class concreteMutableClass = nil;
|
||||||
|
|
||||||
- (BOOL) hasMemberInPlane: (uint8_t)aPlane
|
- (BOOL) hasMemberInPlane: (uint8_t)aPlane
|
||||||
{
|
{
|
||||||
unsigned found;
|
NSUInteger found;
|
||||||
|
|
||||||
found = [indexes indexGreaterThanOrEqualToIndex: 0x10000 * aPlane];
|
found = [indexes indexGreaterThanOrEqualToIndex: 0x10000 * aPlane];
|
||||||
if (found != NSNotFound && found < 0x10000 * (aPlane + 1))
|
if (found != NSNotFound && found < 0x10000 * (aPlane + 1))
|
||||||
|
@ -1417,10 +1417,10 @@ static Class concreteMutableClass = nil;
|
||||||
length = [aString length];
|
length = [aString length];
|
||||||
if (length > 0)
|
if (length > 0)
|
||||||
{
|
{
|
||||||
unsigned i;
|
NSUInteger i;
|
||||||
unichar (*get)(id, SEL, unsigned);
|
unichar (*get)(id, SEL, NSUInteger);
|
||||||
|
|
||||||
get = (unichar (*)(id, SEL, unsigned))
|
get = (unichar (*)(id, SEL, NSUInteger))
|
||||||
[aString methodForSelector: @selector(characterAtIndex:)];
|
[aString methodForSelector: @selector(characterAtIndex:)];
|
||||||
for (i = 0; i < length; i++)
|
for (i = 0; i < length; i++)
|
||||||
{
|
{
|
||||||
|
@ -1450,9 +1450,9 @@ static Class concreteMutableClass = nil;
|
||||||
- (void) formIntersectionWithCharacterSet: (NSCharacterSet *)otherSet
|
- (void) formIntersectionWithCharacterSet: (NSCharacterSet *)otherSet
|
||||||
{
|
{
|
||||||
NSIndexSet *otherIndexes;
|
NSIndexSet *otherIndexes;
|
||||||
unsigned index = 0;
|
NSUInteger index = 0;
|
||||||
unsigned i0;
|
NSUInteger i0;
|
||||||
unsigned i1;
|
NSUInteger i1;
|
||||||
|
|
||||||
if ([otherSet isKindOfClass: [_GSIndexCharSet class]] == YES)
|
if ([otherSet isKindOfClass: [_GSIndexCharSet class]] == YES)
|
||||||
{
|
{
|
||||||
|
@ -1521,7 +1521,7 @@ static Class concreteMutableClass = nil;
|
||||||
- (void) formUnionWithCharacterSet: (NSCharacterSet*)otherSet
|
- (void) formUnionWithCharacterSet: (NSCharacterSet*)otherSet
|
||||||
{
|
{
|
||||||
NSIndexSet *otherIndexes;
|
NSIndexSet *otherIndexes;
|
||||||
unsigned index;
|
NSUInteger index;
|
||||||
|
|
||||||
if ([otherSet isKindOfClass: [_GSIndexCharSet class]] == YES)
|
if ([otherSet isKindOfClass: [_GSIndexCharSet class]] == YES)
|
||||||
{
|
{
|
||||||
|
@ -1553,7 +1553,7 @@ static Class concreteMutableClass = nil;
|
||||||
- (void) invert
|
- (void) invert
|
||||||
{
|
{
|
||||||
NSMutableIndexSet *tmp;
|
NSMutableIndexSet *tmp;
|
||||||
unsigned index;
|
NSUInteger index;
|
||||||
|
|
||||||
tmp = [NSMutableIndexSet new];
|
tmp = [NSMutableIndexSet new];
|
||||||
|
|
||||||
|
@ -1614,10 +1614,10 @@ static Class concreteMutableClass = nil;
|
||||||
length = [aString length];
|
length = [aString length];
|
||||||
if (length > 0)
|
if (length > 0)
|
||||||
{
|
{
|
||||||
unsigned i;
|
NSUInteger i;
|
||||||
unichar (*get)(id, SEL, unsigned);
|
unichar (*get)(id, SEL, NSUInteger);
|
||||||
|
|
||||||
get = (unichar (*)(id, SEL, unsigned))
|
get = (unichar (*)(id, SEL, NSUInteger))
|
||||||
[aString methodForSelector: @selector(characterAtIndex:)];
|
[aString methodForSelector: @selector(characterAtIndex:)];
|
||||||
|
|
||||||
for (i = 0; i < length; i++)
|
for (i = 0; i < length; i++)
|
||||||
|
|
|
@ -1583,7 +1583,7 @@ static NSLock *cached_proxies_gate = nil;
|
||||||
GS_M_LOCK(IrefGate);
|
GS_M_LOCK(IrefGate);
|
||||||
if (IrunLoops != nil)
|
if (IrunLoops != nil)
|
||||||
{
|
{
|
||||||
unsigned pos = [IrunLoops indexOfObjectIdenticalTo: loop];
|
NSUInteger pos = [IrunLoops indexOfObjectIdenticalTo: loop];
|
||||||
|
|
||||||
if (pos != NSNotFound)
|
if (pos != NSNotFound)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1214,7 +1214,7 @@ newLanguages(NSArray *oldNames)
|
||||||
|
|
||||||
- (void) addSuiteNamed: (NSString*)aName
|
- (void) addSuiteNamed: (NSString*)aName
|
||||||
{
|
{
|
||||||
unsigned index;
|
NSUInteger index;
|
||||||
|
|
||||||
if (aName == nil)
|
if (aName == nil)
|
||||||
{
|
{
|
||||||
|
|
|
@ -127,7 +127,7 @@ static NSString *parse_string(NSString **ptr)
|
||||||
NSMutableArray *update_list=[[NSMutableArray alloc] init];
|
NSMutableArray *update_list=[[NSMutableArray alloc] init];
|
||||||
NSArray *lines;
|
NSArray *lines;
|
||||||
NSString *l;
|
NSString *l;
|
||||||
int i,c,pos;
|
NSInteger i,c,pos;
|
||||||
NSMutableDictionary *dummy_entries=[[NSMutableDictionary alloc] init];
|
NSMutableDictionary *dummy_entries=[[NSMutableDictionary alloc] init];
|
||||||
|
|
||||||
NSMutableString *user_comment=[[NSMutableString alloc] init];
|
NSMutableString *user_comment=[[NSMutableString alloc] init];
|
||||||
|
|
|
@ -39,7 +39,7 @@ void create_output(id propertyList)
|
||||||
NSFileHandle *fileHandle = nil;
|
NSFileHandle *fileHandle = nil;
|
||||||
NSProcessInfo *processInfo = [NSProcessInfo processInfo];
|
NSProcessInfo *processInfo = [NSProcessInfo processInfo];
|
||||||
NSArray *arguments = [processInfo arguments];
|
NSArray *arguments = [processInfo arguments];
|
||||||
int outputIndex = 0;
|
NSInteger outputIndex = 0;
|
||||||
|
|
||||||
// insert your code here
|
// insert your code here
|
||||||
outputIndex = [arguments indexOfObject: @"-output"];
|
outputIndex = [arguments indexOfObject: @"-output"];
|
||||||
|
@ -94,7 +94,7 @@ NSData *read_input()
|
||||||
NSFileHandle *fileHandle = nil;
|
NSFileHandle *fileHandle = nil;
|
||||||
NSProcessInfo *processInfo = [NSProcessInfo processInfo];
|
NSProcessInfo *processInfo = [NSProcessInfo processInfo];
|
||||||
NSArray *arguments = [processInfo arguments];
|
NSArray *arguments = [processInfo arguments];
|
||||||
int inputIndex = 0;
|
NSInteger inputIndex = 0;
|
||||||
|
|
||||||
// insert your code here
|
// insert your code here
|
||||||
inputIndex = [arguments indexOfObject: @"-input"];
|
inputIndex = [arguments indexOfObject: @"-input"];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue