You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-11-23 21:54:53 +02:00
avutil/attributes: don't force format checking to __gnu_printf__ on mingw build
Use __MINGW_{PRINTF,SCANF}_FORMAT which matches the format check for
implementation that is actually used.
Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
This commit is contained in:
@@ -172,11 +172,36 @@
|
||||
|
||||
#if defined(__GNUC__) || defined(__clang__)
|
||||
# define av_builtin_constant_p __builtin_constant_p
|
||||
# define av_printf_format(fmtpos, attrpos) __attribute__((__format__(__printf__, fmtpos, attrpos)))
|
||||
# define av_scanf_format(fmtpos, attrpos) __attribute__((__format__(__scanf__, fmtpos, attrpos)))
|
||||
#else
|
||||
# define av_builtin_constant_p(x) 0
|
||||
#endif
|
||||
|
||||
// for __MINGW_PRINTF_FORMAT and __MINGW_SCANF_FORMAT
|
||||
#ifdef __MINGW32__
|
||||
# include <stdio.h>
|
||||
#endif
|
||||
|
||||
#ifdef __MINGW_PRINTF_FORMAT
|
||||
# define AV_PRINTF_FMT __MINGW_PRINTF_FORMAT
|
||||
#elif defined(__GNUC__) || defined(__clang__)
|
||||
# define AV_PRINTF_FMT __printf__
|
||||
#endif
|
||||
|
||||
#ifdef __MINGW_SCANF_FORMAT
|
||||
# define AV_SCANF_FMT __MINGW_SCANF_FORMAT
|
||||
#elif defined(__GNUC__) || defined(__clang__)
|
||||
# define AV_SCANF_FMT __scanf__
|
||||
#endif
|
||||
|
||||
#ifdef AV_PRINTF_FMT
|
||||
# define av_printf_format(fmtpos, attrpos) __attribute__((format(AV_PRINTF_FMT, fmtpos, attrpos)))
|
||||
#else
|
||||
# define av_printf_format(fmtpos, attrpos)
|
||||
#endif
|
||||
|
||||
#ifdef AV_SCANF_FMT
|
||||
# define av_scanf_format(fmtpos, attrpos) __attribute__((format(AV_SCANF_FMT, fmtpos, attrpos)))
|
||||
#else
|
||||
# define av_scanf_format(fmtpos, attrpos)
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user