diff --git a/Source/Additions/GSMime.m b/Source/Additions/GSMime.m index 48b42af1c..cdb3862c3 100644 --- a/Source/Additions/GSMime.m +++ b/Source/Additions/GSMime.m @@ -8285,7 +8285,7 @@ typedef enum { SMTPE_DSN, // delivery status notification extension } SMTPE; -NSString * +static NSString * eventText(NSStreamEvent e) { if (e == NSStreamEventNone) @@ -8303,7 +8303,7 @@ eventText(NSStreamEvent e) return @"unknown event"; } -NSString * +static NSString * statusText(NSStreamStatus s) { if (s == NSStreamStatusNotOpen) return @"NSStreamStatusNotOpen"; diff --git a/Source/GSFFIInvocation.m b/Source/GSFFIInvocation.m index 69f32e3fd..5215a99fd 100644 --- a/Source/GSFFIInvocation.m +++ b/Source/GSFFIInvocation.m @@ -189,7 +189,7 @@ IMP gs_objc_msg_forward (SEL sel) return gs_objc_msg_forward2 (nil, sel); } #ifdef __GNUSTEP_RUNTIME__ -gs_thread_key_t thread_slot_key; +static gs_thread_key_t thread_slot_key; static struct objc_slot * gs_objc_msg_forward3(id receiver, SEL op) { diff --git a/Source/GSICUString.h b/Source/GSICUString.h index ef24e0d29..a9dad59ed 100644 --- a/Source/GSICUString.h +++ b/Source/GSICUString.h @@ -1,5 +1,6 @@ -#import -#import +#import "Foundation/NSString.h" +#import "Foundation/NSException.h" +#import "GSPrivate.h" #if defined(HAVE_UNICODE_UTEXT_H) #include @@ -30,7 +31,7 @@ * The returned UText object holds a reference to the NSString and accesses its * contents directly. */ -UText* UTextInitWithNSString(UText *txt, NSString *str); +UText* UTextInitWithNSString(UText *txt, NSString *str) GS_ATTRIB_PRIVATE; /** * Initialises a UText structure with an NSMutableString. If txt is NULL, then @@ -43,7 +44,8 @@ UText* UTextInitWithNSString(UText *txt, NSString *str); * This function returns a mutable UText, and changes made to it will be * reflected in the underlying NSMutableString. */ -UText* UTextInitWithNSMutableString(UText *txt, NSMutableString *str); +UText* UTextInitWithNSMutableString(UText *txt, NSMutableString *str) + GS_ATTRIB_PRIVATE; /** * GSUTextString is an NSString subclass that is backed by a libicu UText diff --git a/Source/GSICUString.m b/Source/GSICUString.m index c8f45b25d..fcad7f75e 100644 --- a/Source/GSICUString.m +++ b/Source/GSICUString.m @@ -50,7 +50,7 @@ UTextNSStringNativeLength(UText *ut) * Loads a group of characters into the buffer that can be directly accessed by * users of the UText. This is used for iteration but UText users. */ -UBool +static UBool UTextNSStringAccess(UText *ut, int64_t nativeIndex, UBool forward) { NSString *str = (NSString*)ut->p; @@ -223,7 +223,7 @@ UTextNSStringExtract(UText *ut, /** * Copy or move some characters within a UText. */ -void UTextNSStringCopy(UText *ut, +static void UTextNSStringCopy(UText *ut, int64_t nativeStart, int64_t nativeLimit, int64_t nativeDest, @@ -276,7 +276,7 @@ UTextNStringClose(UText *ut) * Typically, this should not actually copy the underlying storage, because it * is immutable. */ -UText* +static UText* UTextNSStringClone(UText *dest, const UText *src, UBool deep, @@ -294,7 +294,7 @@ UTextNSStringClone(UText *dest, /** * Copies the UText object, optionally copying the NSMutableString. */ -UText* +static UText* UTextNSMutableStringClone(UText *dest, const UText *src, UBool deep, @@ -319,7 +319,7 @@ UTextNSMutableStringClone(UText *dest, /** * Returns the index of the current character in the temporary buffer. */ -int64_t +static int64_t UTextNSStringMapOffsetToNative(const UText *ut) { return ut->chunkNativeStart + ut->chunkOffset; diff --git a/Source/GSShellSort.m b/Source/GSShellSort.m index 3f0bf9989..745852c23 100644 --- a/Source/GSShellSort.m +++ b/Source/GSShellSort.m @@ -29,7 +29,7 @@ #import "Foundation/NSObjCRuntime.h" #import "GSSorting.h" -void +static void _GSShellSort(id *objects, NSRange sortRange, id comparisonEntity, @@ -121,4 +121,4 @@ _GSShellSort(id *objects, _GSSortUnstable = _GSShellSort; } @end - + diff --git a/Source/GSSorting.h b/Source/GSSorting.h index 51e766264..a8445b981 100644 --- a/Source/GSSorting.h +++ b/Source/GSSorting.h @@ -45,7 +45,7 @@ typedef NSUInteger GSComparisonType; * GNUstep. */ extern void (*_GSSortUnstable)(id *buffer, NSRange range, id comparisonEntity, - GSComparisonType cmprType, void *context); + GSComparisonType cmprType, void *context) GS_ATTRIB_PRIVATE; /** * This is the internal prototype of an stable, non-concurrency safe sorting @@ -54,7 +54,7 @@ extern void (*_GSSortUnstable)(id *buffer, NSRange range, id comparisonEntity, * GNUstep. */ extern void (*_GSSortStable)(id *buffer, NSRange range, id comparisonEntity, - GSComparisonType cmprType, void *context); + GSComparisonType cmprType, void *context) GS_ATTRIB_PRIVATE; /** * This is the internal prototype of an unstable, concurrency safe sorting @@ -63,7 +63,8 @@ extern void (*_GSSortStable)(id *buffer, NSRange range, id comparisonEntity, * GNUstep. */ extern void (*_GSSortUnstableConcurrent)(id *buffer, NSRange range, - id comparisonEntity, GSComparisonType cmprType, void *context); + id comparisonEntity, GSComparisonType cmprType, void *context) + GS_ATTRIB_PRIVATE; /** * This is the internal prototype of an stable, concurrency safe sorting @@ -72,7 +73,8 @@ extern void (*_GSSortUnstableConcurrent)(id *buffer, NSRange range, * GNUstep. */ extern void (*_GSSortStableConcurrent)(id *buffer, NSRange range, - id comparisonEntity, GSComparisonType cmprType, void *context); + id comparisonEntity, GSComparisonType cmprType, void *context) + GS_ATTRIB_PRIVATE; /** * GSSortUnstable() uses the above prototypes to provide sorting that does not diff --git a/Source/NSHTTPCookieStorage.m b/Source/NSHTTPCookieStorage.m index 46a2788fd..5cdff86b5 100644 --- a/Source/NSHTTPCookieStorage.m +++ b/Source/NSHTTPCookieStorage.m @@ -32,7 +32,7 @@ #import "Foundation/NSString.h" #import "Foundation/NSDistributedNotificationCenter.h" -NSString *objectObserver = @"org.GNUstep.NSHTTPCookieStorage"; +static NSString *objectObserver = @"org.GNUstep.NSHTTPCookieStorage"; // Internal data storage typedef struct { diff --git a/Source/NSObject.m b/Source/NSObject.m index 4f6eb259d..02116d471 100644 --- a/Source/NSObject.m +++ b/Source/NSObject.m @@ -608,12 +608,12 @@ NSDecrementExtraRefCountWasZero(id anObject) return release_fast_no_destroy(anObject); } -size_t object_getRetainCount_np_internal(id anObject) +static size_t object_getRetainCount_np_internal(id anObject) { return ((obj)anObject)[-1].retained + 1; } -size_t getRetainCount(id anObject) +static size_t getRetainCount(id anObject) { #ifdef __GNUSTEP_RUNTIME__ if (object_getRetainCount_np) diff --git a/Source/cifframe.h b/Source/cifframe.h index 1316cff2d..caf474ace 100644 --- a/Source/cifframe.h +++ b/Source/cifframe.h @@ -52,14 +52,17 @@ typedef struct _cifframe_t { @class NSMutableData; -extern GSCodeBuffer* cifframe_closure(NSMethodSignature *sig, void (*func)()); +extern GSCodeBuffer* cifframe_closure(NSMethodSignature *sig, + void (*func)()) GS_ATTRIB_PRIVATE; extern void cifframe_set_arg(cifframe_t *cframe, int index, void *buffer, - int size); + int size) GS_ATTRIB_PRIVATE; extern void cifframe_get_arg(cifframe_t *cframe, int index, void *buffer, - int size); -extern void *cifframe_arg_addr(cifframe_t *cframe, int index); -extern BOOL cifframe_decode_arg(const char *type, void* buffer); -extern BOOL cifframe_encode_arg(const char *type, void* buffer); + int size) GS_ATTRIB_PRIVATE; +extern void *cifframe_arg_addr(cifframe_t *cframe, int index) GS_ATTRIB_PRIVATE; +extern BOOL cifframe_decode_arg(const char *type, + void *buffer) GS_ATTRIB_PRIVATE; +extern BOOL cifframe_encode_arg(const char *type, + void *buffer) GS_ATTRIB_PRIVATE; #endif diff --git a/Source/cifframe.m b/Source/cifframe.m index 2ae37d42f..dc5352f0c 100644 --- a/Source/cifframe.m +++ b/Source/cifframe.m @@ -97,7 +97,7 @@ cifframe_type(const char *typePtr, const char **adv, NSPointerArray **extra); /* Best guess at the space needed for a structure, since we don't know for sure until it's calculated in ffi_prep_cif, which is too late */ -int +static int cifframe_guess_struct_size(ffi_type *stype) { int i, size;