Restrict NS_FORMAT_ARGUMENT() to Clang.

Causes warning with recent GCC:
'format_arg' attribute directive ignored [-Wattributes]
This commit is contained in:
Frederik Seiffert 2021-11-28 17:18:37 +01:00 committed by Frederik Seiffert
parent 85711ee5f8
commit eea7d47a77

View file

@ -420,7 +420,7 @@ static inline void gs_consumed(id NS_CONSUMED GS_UNUSED_ARG o) { return; }
*/
#ifndef NS_FORMAT_ARGUMENT
#if defined(__clang__) || GS_GCC_MINREQ(4,2)
#if defined(__clang__)
# define NS_FORMAT_ARGUMENT(A) __attribute__((format_arg(A)))
#else
# define NS_FORMAT_ARGUMENT(A)