mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-29 16:01:38 +00:00
Trivial tidyups
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@14959 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
b147e0b54c
commit
538cd7f76f
19 changed files with 58 additions and 100 deletions
|
@ -75,7 +75,7 @@ typedef enum {
|
|||
/*
|
||||
* Get the dictionary representation.
|
||||
*/
|
||||
NSDictionary *GSUserDefaultsDictionaryRepresentation();
|
||||
NSDictionary *GSUserDefaultsDictionaryRepresentation(void);
|
||||
|
||||
/*
|
||||
* Get one of several potentially useful flags.
|
||||
|
|
|
@ -231,13 +231,13 @@ static NSStringEncoding intEnc = NSISOLatin1StringEncoding;
|
|||
* initialized, and caches classes and some method implementations.
|
||||
*/
|
||||
static void
|
||||
setup()
|
||||
setup(void)
|
||||
{
|
||||
static BOOL beenHere = NO;
|
||||
|
||||
if (beenHere == NO)
|
||||
{
|
||||
extern NSStringEncoding GetDefEncoding();
|
||||
extern NSStringEncoding GetDefEncoding(void);
|
||||
|
||||
beenHere = YES;
|
||||
|
||||
|
|
|
@ -446,19 +446,22 @@ GSEQ_STRCOMP(NSString *ss, NSString *os, unsigned mask, NSRange aRange)
|
|||
#endif
|
||||
|
||||
#if GSEQ_S == GSEQ_NS || GSEQ_S == GSEQ_US
|
||||
srImp = (NSRange (*)())[(id)s methodForSelector: ranSel];
|
||||
srImp = (NSRange (*)(NSString*, SEL, unsigned))
|
||||
[(id)s methodForSelector: ranSel];
|
||||
#endif
|
||||
#if GSEQ_O == GSEQ_NS || GSEQ_O == GSEQ_US
|
||||
orImp = (NSRange (*)())[(id)o methodForSelector: ranSel];
|
||||
orImp = (NSRange (*)(NSString*, SEL, unsigned))
|
||||
[(id)o methodForSelector: ranSel];
|
||||
#endif
|
||||
#if GSEQ_S == GSEQ_NS
|
||||
sgImp = (void (*)())[(id)s methodForSelector: gcrSel];
|
||||
sgImp = (void (*)(NSString*, SEL, unichar*, NSRange))
|
||||
[(id)s methodForSelector: gcrSel];
|
||||
#endif
|
||||
#if GSEQ_O == GSEQ_NS
|
||||
ogImp = (void (*)())[(id)o methodForSelector: gcrSel];
|
||||
ogImp = (void (*)(NSString*, SEL, unichar*, NSRange))
|
||||
[(id)o methodForSelector: gcrSel];
|
||||
#endif
|
||||
|
||||
|
||||
while (sCount < end)
|
||||
{
|
||||
if (oCount >= oLength)
|
||||
|
|
|
@ -39,7 +39,21 @@
|
|||
#
|
||||
|
||||
# Additional flags to pass to the preprocessor
|
||||
ADDITIONAL_CPPFLAGS = $(DEFS) $(CONFIG_SYSTEM_DEFS) -Wall
|
||||
ADDITIONAL_CPPFLAGS = $(DEFS) $(CONFIG_SYSTEM_DEFS) -Wall \
|
||||
#-Wpointer-arith \
|
||||
#-Wcast-qual \
|
||||
#-Wcast-align \
|
||||
#-Wwrite-strings \
|
||||
#-Wstrict-prototypes \
|
||||
#-Wmissing-prototypes \
|
||||
#-Wmissing-declarations \
|
||||
#-Wredundant-decls \
|
||||
#-Wnested-externs \
|
||||
#-Winline \
|
||||
#-Werror \
|
||||
#-Wshadow
|
||||
#-Wconversion
|
||||
|
||||
|
||||
# Additional flags to pass to the Objective-C compiler
|
||||
ADDITIONAL_OBJCFLAGS =
|
||||
|
|
|
@ -46,6 +46,8 @@
|
|||
#include <Foundation/NSDebug.h>
|
||||
#include "GSPrivate.h"
|
||||
|
||||
extern BOOL GSMacOSXCompatiblePropertyLists(void);
|
||||
|
||||
@class NSArrayEnumerator;
|
||||
@class NSArrayEnumeratorReverse;
|
||||
|
||||
|
@ -1100,7 +1102,6 @@ static NSString *indentStrings[] = {
|
|||
*/
|
||||
- (BOOL) writeToFile: (NSString *)path atomically: (BOOL)useAuxiliaryFile
|
||||
{
|
||||
extern BOOL GSMacOSXCompatiblePropertyLists();
|
||||
NSDictionary *loc;
|
||||
NSString *desc;
|
||||
|
||||
|
@ -1136,7 +1137,6 @@ static NSString *indentStrings[] = {
|
|||
*/
|
||||
- (BOOL) writeToURL: (NSURL *)url atomically: (BOOL)useAuxiliaryFile
|
||||
{
|
||||
extern BOOL GSMacOSXCompatiblePropertyLists();
|
||||
NSDictionary *loc;
|
||||
NSString *desc;
|
||||
|
||||
|
|
|
@ -685,7 +685,6 @@ failure:
|
|||
int i;
|
||||
int j;
|
||||
NSZone *z;
|
||||
extern BOOL GSMacOSXCompatiblePropertyLists();
|
||||
|
||||
src = [self bytes];
|
||||
length = [self length];
|
||||
|
|
|
@ -124,7 +124,7 @@ otherTime(NSDate* other)
|
|||
* Returns the current time (seconds since reference date) as an NSTimeInterval.
|
||||
*/
|
||||
NSTimeInterval
|
||||
GSTimeNow()
|
||||
GSTimeNow(void)
|
||||
{
|
||||
#if !defined(__MINGW__)
|
||||
NSTimeInterval interval;
|
||||
|
|
|
@ -58,7 +58,7 @@ static BOOL debug_allocation = NO;
|
|||
static NSLock *uniqueLock;
|
||||
|
||||
static const char* _GSDebugAllocationList(BOOL difference);
|
||||
static const char* _GSDebugAllocationListAll();
|
||||
static const char* _GSDebugAllocationListAll(void);
|
||||
|
||||
@interface GSDebugAlloc : NSObject
|
||||
+ (void) initialize;
|
||||
|
@ -534,7 +534,7 @@ GSDebugAllocationListAll()
|
|||
}
|
||||
|
||||
static const char*
|
||||
_GSDebugAllocationListAll()
|
||||
_GSDebugAllocationListAll(void)
|
||||
{
|
||||
int pos = 0;
|
||||
int i;
|
||||
|
|
|
@ -83,8 +83,8 @@ behavior_class_add_class (Class class, Class behavior)
|
|||
}
|
||||
else
|
||||
NSCAssert2(class->instance_size >= behavior->instance_size,
|
||||
@"Trying to add behavior (%s) with instance size larger than class (%s)",
|
||||
class_get_class_name(behavior), class_get_class_name(class));
|
||||
@"Trying to add behavior (%s) with instance size larger than class (%s)",
|
||||
class_get_class_name(behavior), class_get_class_name(class));
|
||||
}
|
||||
#else
|
||||
/* If necessary, increase instance_size of CLASS. */
|
||||
|
@ -154,13 +154,6 @@ behavior_class_add_class (Class class, Class behavior)
|
|||
return;
|
||||
}
|
||||
|
||||
/* The old interface */
|
||||
void
|
||||
class_add_behavior (Class class, Class behavior)
|
||||
{
|
||||
behavior_class_add_class (class, behavior);
|
||||
}
|
||||
|
||||
void
|
||||
behavior_class_add_category (Class class, struct objc_category *category)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue