Fix errors spotted by Fred

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29662 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
rfm 2010-02-18 08:45:00 +00:00
parent bbcf9bd03e
commit e689e6a654
6 changed files with 26 additions and 16 deletions

View file

@ -1,3 +1,12 @@
2010-02-18 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSSpellServer.m:
* Source/NSMethodSignature.m:
* Source/NSString.m:
* Headers/Foundation/NSSpellServer.h:
* Headers/Foundation/NSObjCRuntime.h:
Fix minor 64bit compatribility errors spotted by Fred.
2010-02-18 Richard Frith-Macdonald <rfm@gnu.org> 2010-02-18 Richard Frith-Macdonald <rfm@gnu.org>
* configure.ac: remove obsolete checks for integer limits constants * configure.ac: remove obsolete checks for integer limits constants

View file

@ -60,17 +60,17 @@ extern "C" {
enum enum
{ {
/** /**
* Specifies that the enumeration is concurrency-safe. Note that this does * Specifies that the enumeration is concurrency-safe. Note that this does
* not mean that it will be carried out in a concurrent manner, only that * not mean that it will be carried out in a concurrent manner, only that
* it can be. * it can be.
*/ */
NSEnumerationConcurrent = (1UL << 0), NSEnumerationConcurrent = (1UL << 0),
/** /**
* Specifies that the enumeration should happen in the opposite of the * Specifies that the enumeration should happen in the opposite of the
* natural order of the collection. * natural order of the collection.
*/ */
NSEnumerationReverse = (1UL << 1) NSEnumerationReverse = (1UL << 1)
}; };
/** Bitfield used to specify options to control enumeration over collections. /** Bitfield used to specify options to control enumeration over collections.

View file

@ -111,7 +111,7 @@ GS_EXPORT NSString *const NSGrammarUserDescription;
- (NSRange) spellServer: (NSSpellServer *)sender - (NSRange) spellServer: (NSSpellServer *)sender
findMisspelledWordInString: (NSString *)stringToCheck findMisspelledWordInString: (NSString *)stringToCheck
language: (NSString *)language language: (NSString *)language
wordCount: (NSInteger *)wordCount wordCount: (int32_t *)wordCount
countOnly: (BOOL)countOnly; countOnly: (BOOL)countOnly;
/** /**

View file

@ -402,6 +402,7 @@ next_arg(const char *typePtr, NSArgumentInfo *info, char *outTypes)
*args = '\0'; *args = '\0';
/* Skip to the first arg type, taking note of where the qualifiers start. /* Skip to the first arg type, taking note of where the qualifiers start.
* Assume that casting _argFrameLength to int will not lose information.
*/ */
p = skip_offset (p); p = skip_offset (p);
q = p; q = p;
@ -414,13 +415,13 @@ next_arg(const char *typePtr, NSArgumentInfo *info, char *outTypes)
size = objc_promoted_size (p); size = objc_promoted_size (p);
p = objc_skip_typespec (p); p = objc_skip_typespec (p);
strncat(args, q, p - q); strncat(args, q, p - q);
sprintf(args + strlen(args), "%d", _argFrameLength); sprintf(args + strlen(args), "%d", (int)_argFrameLength);
_argFrameLength += size; _argFrameLength += size;
p = skip_offset (p); p = skip_offset (p);
q = p; q = p;
p = objc_skip_type_qualifiers (p); p = objc_skip_type_qualifiers (p);
} }
sprintf(ret + strlen(ret), "%d", _argFrameLength); sprintf(ret + strlen(ret), "%d", (int)_argFrameLength);
_methodTypes = NSZoneMalloc(NSDefaultMallocZone(), _methodTypes = NSZoneMalloc(NSDefaultMallocZone(),
strlen(args) + strlen(ret) + 1); strlen(args) + strlen(ret) + 1);
strcpy((char*)_methodTypes, ret); strcpy((char*)_methodTypes, ret);

View file

@ -424,7 +424,7 @@ is a set of words learned by the spell service for that particular user.
- (NSRange) _findMisspelledWordInString: (NSString *)stringToCheck - (NSRange) _findMisspelledWordInString: (NSString *)stringToCheck
language: (NSString *)language language: (NSString *)language
ignoredWords: (NSArray *)ignoredWords ignoredWords: (NSArray *)ignoredWords
wordCount: (int *)wordCount wordCount: (int32_t *)wordCount
countOnly: (BOOL)countOnly countOnly: (BOOL)countOnly
{ {
NSRange r = NSMakeRange(0,0); NSRange r = NSMakeRange(0,0);

View file

@ -488,7 +488,7 @@ static const unichar byteOrderMarkSwapped = 0xFFFE;
#if ! PRINTF_ATSIGN_VA_LIST #if ! PRINTF_ATSIGN_VA_LIST
static int static int
arginfo_func (const struct printf_info *info, size_t n, NSInteger*argtypes) arginfo_func (const struct printf_info *info, size_t n, int *argtypes)
{ {
*argtypes = PA_POINTER; *argtypes = PA_POINTER;
return 1; return 1;