Re: warning when compiling base and other programs

Frederik Seiffert <[email protected]> Tue, 23 Nov 2021 13:36:16 +0100
Newsgroups gmane.comp.lib.gnustep.devel
Message-ID <[email protected]>
I recently added NS_FORMAT_ARGUMENT to -[NSBundle localizedStringForKey:...] (that macro was previously unused):
https://github.com/gnustep/libs-base/commit/87783e25137b4159dd846bf645aa907371615e8c <https://github.com/gnustep/libs-base/commit/87783e25137b4159dd846bf645aa907371615e8c>

Which compiler are you using? It sounds like it doesn’t support the format_arg attribute, so we might have to adjust the check in GSVersionMacros.h (currently enabled for Clang and GCC >= 4.2).

Frederik


> Am 23.11.2021 um 14:03 schrieb Riccardo Mottola <[email protected]>:
> 
> Hello,
> 
> since recently I get many of these warnings:
> 
> ../../Headers/Foundation/NSBundle.h:348:10: warning: 'format_arg'
> attribute directive ignored [-Wattributes]
>           table: (NSString*)tableName NS_FORMAT_ARGUMENT(1);
> 
> In base itself (updated today) but also elsewhere.
> 
> Riccardo
>