mirror of
https://github.com/gnustep/libs-base.git
synced 2025-06-01 17:12:03 +00:00
Added some macros for use with the static analyser. Turned _reserved ivar in GSSpellServer into GS_PADDING_IVAR (no change to class layout).
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32036 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
f3a58fb845
commit
8213813c6d
3 changed files with 48 additions and 3 deletions
|
@ -238,6 +238,51 @@
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* Static analyser macros: Provide annotations to help the analyser */
|
||||||
|
// TODO: Make this more sensible when GCC supports __attribute__((unused)) on
|
||||||
|
// ivars
|
||||||
|
#ifdef __clang__
|
||||||
|
# define GS_UNUSED_IVAR __attribute__((unused))
|
||||||
|
# define GS_NORETURN_METHOD __attribute__((__noreturn__))
|
||||||
|
#else
|
||||||
|
# define GS_UNUSED_IVAR
|
||||||
|
# define GS_NORETURN_METHOD
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef NS_RETURNS_RETAINED
|
||||||
|
# if __has_feature(attribute_ns_returns_retained)
|
||||||
|
# define NS_RETURNS_RETAINED __attribute__((ns_returns_retained))
|
||||||
|
# else
|
||||||
|
# define NS_RETURNS_RETAINED
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef NS_RETURNS_NOT_RETAINED
|
||||||
|
# if __has_feature(attribute_ns_returns_not_retained)
|
||||||
|
# define NS_RETURNS_NOT_RETAINED __attribute__((ns_returns_not_retained))
|
||||||
|
# else
|
||||||
|
# define NS_RETURNS_NOT_RETAINED
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef NS_CONSUMED
|
||||||
|
# if __has_feature(attribute_ns_consumed)
|
||||||
|
# define NS_CONSUMED __attribute__((ns_consumed))
|
||||||
|
# else
|
||||||
|
# define NS_CONSUMED
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef NS_CONSUMES_SELF
|
||||||
|
# if __has_feature(attribute_ns_consumes_self)
|
||||||
|
# define NS_CONSUMES_SELF __attribute__((ns_consumes_self))
|
||||||
|
# else
|
||||||
|
# define NS_CONSUMES_SELF
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* Include the appropriate header for ObjC2 blocks support if it is in use.
|
/* Include the appropriate header for ObjC2 blocks support if it is in use.
|
||||||
*
|
*
|
||||||
* FIXME: "OBJC2RUNTIME" is set to "1" if the runtime has
|
* FIXME: "OBJC2RUNTIME" is set to "1" if the runtime has
|
||||||
|
|
|
@ -380,13 +380,13 @@ GS_EXPORT void _NSRemoveHandler( NSHandler *handler );
|
||||||
- (void) handleFailureInFunction: (NSString*)functionName
|
- (void) handleFailureInFunction: (NSString*)functionName
|
||||||
file: (NSString*)fileName
|
file: (NSString*)fileName
|
||||||
lineNumber: (NSInteger)line
|
lineNumber: (NSInteger)line
|
||||||
description: (NSString*)format,...;
|
description: (NSString*)format,... GS_NORETURN_METHOD;
|
||||||
|
|
||||||
- (void) handleFailureInMethod: (SEL)aSelector
|
- (void) handleFailureInMethod: (SEL)aSelector
|
||||||
object: object
|
object: object
|
||||||
file: (NSString*)fileName
|
file: (NSString*)fileName
|
||||||
lineNumber: (NSInteger)line
|
lineNumber: (NSInteger)line
|
||||||
description: (NSString*)format,...;
|
description: (NSString*)format,... GS_NORETURN_METHOD;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
extern NSString *const NSAssertionHandlerKey;
|
extern NSString *const NSAssertionHandlerKey;
|
||||||
|
|
|
@ -63,8 +63,8 @@ GS_EXPORT NSString *const NSGrammarUserDescription;
|
||||||
NSMutableDictionary *_userDictionaries;
|
NSMutableDictionary *_userDictionaries;
|
||||||
NSString *_currentLanguage;
|
NSString *_currentLanguage;
|
||||||
NSArray *_ignoredWords;
|
NSArray *_ignoredWords;
|
||||||
void *_reserved;
|
|
||||||
#endif
|
#endif
|
||||||
|
GS_PADDING_IVAR;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Checking in Your Service
|
// Checking in Your Service
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue