Add a GS_PADDING_IVAR macro. This defines the void *gs_unused; instance variable with __attribute__((unused)) on clang so that the static analyser only reports unused ivars that we expect to be used. This also makes it slightly easier to add the padding ivar to new classes.

Note: The padding ivar has been added to NSRegularExpression.  This will break the ABI for anyone subclassing NSRegularExpression, but hopefully that's no one (done before the next release, to make sure that we don't break the ABI between releases, only for people following -trunk).



git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32033 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
David Chisnall 2011-02-10 11:02:50 +00:00
parent 5d623d76fc
commit c7c3c7c02e
35 changed files with 47 additions and 108 deletions

View file

@ -119,9 +119,7 @@ GS_EXPORT NSString* const NSLoadedClasses;
unsigned _version;
NSString *_frameworkVersion;
#endif
#if !GS_NONFRAGILE
void *_unused;
#endif
GS_PADDING_IVAR;
}
/** Return an array enumerating all the bundles in the application. This