* 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:
Eric Wasylishen 2012-03-06 03:05:23 +00:00
parent db838e79a3
commit 6f803c1c70
6 changed files with 33 additions and 24 deletions

View file

@ -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>
* Source/NSString.m: Factor out code for opening an ICU collator

View file

@ -332,10 +332,10 @@
length = [aString length];
if (length > 0)
{
unsigned i;
unichar (*get)(id, SEL, unsigned);
NSUInteger i;
unichar (*get)(id, SEL, NSUInteger);
get = (unichar (*)(id, SEL, unsigned))
get = (unichar (*)(id, SEL, NSUInteger))
[aString methodForSelector: @selector(characterAtIndex:)];
for (i = 0; i < length; i++)
{
@ -502,10 +502,10 @@
length = [aString length];
if (length > 0)
{
unsigned i;
unichar (*get)(id, SEL, unsigned);
NSUInteger i;
unichar (*get)(id, SEL, NSUInteger);
get = (unichar (*)(id, SEL, unsigned))
get = (unichar (*)(id, SEL, NSUInteger))
[aString methodForSelector: @selector(characterAtIndex:)];
for (i = 0; i < length; i++)
@ -1227,7 +1227,7 @@ static Class concreteMutableClass = nil;
{
NSMutableBitmapCharSet *tmp;
NSData *result;
unsigned index = 0;
NSUInteger index = 0;
tmp = [NSMutableBitmapCharSet new];
while ((index = [indexes indexGreaterThanOrEqualToIndex: index])
@ -1276,7 +1276,7 @@ static Class concreteMutableClass = nil;
- (BOOL) hasMemberInPlane: (uint8_t)aPlane
{
unsigned found;
NSUInteger found;
found = [indexes indexGreaterThanOrEqualToIndex: 0x10000 * aPlane];
if (found != NSNotFound && found < 0x10000 * (aPlane + 1))
@ -1417,10 +1417,10 @@ static Class concreteMutableClass = nil;
length = [aString length];
if (length > 0)
{
unsigned i;
unichar (*get)(id, SEL, unsigned);
NSUInteger i;
unichar (*get)(id, SEL, NSUInteger);
get = (unichar (*)(id, SEL, unsigned))
get = (unichar (*)(id, SEL, NSUInteger))
[aString methodForSelector: @selector(characterAtIndex:)];
for (i = 0; i < length; i++)
{
@ -1450,9 +1450,9 @@ static Class concreteMutableClass = nil;
- (void) formIntersectionWithCharacterSet: (NSCharacterSet *)otherSet
{
NSIndexSet *otherIndexes;
unsigned index = 0;
unsigned i0;
unsigned i1;
NSUInteger index = 0;
NSUInteger i0;
NSUInteger i1;
if ([otherSet isKindOfClass: [_GSIndexCharSet class]] == YES)
{
@ -1521,7 +1521,7 @@ static Class concreteMutableClass = nil;
- (void) formUnionWithCharacterSet: (NSCharacterSet*)otherSet
{
NSIndexSet *otherIndexes;
unsigned index;
NSUInteger index;
if ([otherSet isKindOfClass: [_GSIndexCharSet class]] == YES)
{
@ -1553,7 +1553,7 @@ static Class concreteMutableClass = nil;
- (void) invert
{
NSMutableIndexSet *tmp;
unsigned index;
NSUInteger index;
tmp = [NSMutableIndexSet new];
@ -1614,10 +1614,10 @@ static Class concreteMutableClass = nil;
length = [aString length];
if (length > 0)
{
unsigned i;
unichar (*get)(id, SEL, unsigned);
NSUInteger i;
unichar (*get)(id, SEL, NSUInteger);
get = (unichar (*)(id, SEL, unsigned))
get = (unichar (*)(id, SEL, NSUInteger))
[aString methodForSelector: @selector(characterAtIndex:)];
for (i = 0; i < length; i++)

View file

@ -1583,7 +1583,7 @@ static NSLock *cached_proxies_gate = nil;
GS_M_LOCK(IrefGate);
if (IrunLoops != nil)
{
unsigned pos = [IrunLoops indexOfObjectIdenticalTo: loop];
NSUInteger pos = [IrunLoops indexOfObjectIdenticalTo: loop];
if (pos != NSNotFound)
{

View file

@ -1214,7 +1214,7 @@ newLanguages(NSArray *oldNames)
- (void) addSuiteNamed: (NSString*)aName
{
unsigned index;
NSUInteger index;
if (aName == nil)
{

View file

@ -127,7 +127,7 @@ static NSString *parse_string(NSString **ptr)
NSMutableArray *update_list=[[NSMutableArray alloc] init];
NSArray *lines;
NSString *l;
int i,c,pos;
NSInteger i,c,pos;
NSMutableDictionary *dummy_entries=[[NSMutableDictionary alloc] init];
NSMutableString *user_comment=[[NSMutableString alloc] init];

View file

@ -39,7 +39,7 @@ void create_output(id propertyList)
NSFileHandle *fileHandle = nil;
NSProcessInfo *processInfo = [NSProcessInfo processInfo];
NSArray *arguments = [processInfo arguments];
int outputIndex = 0;
NSInteger outputIndex = 0;
// insert your code here
outputIndex = [arguments indexOfObject: @"-output"];
@ -94,7 +94,7 @@ NSData *read_input()
NSFileHandle *fileHandle = nil;
NSProcessInfo *processInfo = [NSProcessInfo processInfo];
NSArray *arguments = [processInfo arguments];
int inputIndex = 0;
NSInteger inputIndex = 0;
// insert your code here
inputIndex = [arguments indexOfObject: @"-input"];