[FFmpeg-devel] [PATCH 6/7] avcodec/srtenc, webvttenc: Use av_printf_format

Andreas Rheinhardt andreas.rheinhardt at outlook.com
Sun Feb 18 03:43:07 EET 2024


Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
---
 libavcodec/srtenc.c    | 5 +----
 libavcodec/webvttenc.c | 5 +----
 2 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/libavcodec/srtenc.c b/libavcodec/srtenc.c
index 9b6f61ebd1..a607beb990 100644
--- a/libavcodec/srtenc.c
+++ b/libavcodec/srtenc.c
@@ -41,10 +41,7 @@ typedef struct {
 } SRTContext;
 
 
-#ifdef __GNUC__
-__attribute__ ((__format__ (__printf__, 2, 3)))
-#endif
-static void srt_print(SRTContext *s, const char *str, ...)
+static av_printf_format(2, 3) void srt_print(SRTContext *s, const char *str, ...)
 {
     va_list vargs;
     va_start(vargs, str);
diff --git a/libavcodec/webvttenc.c b/libavcodec/webvttenc.c
index 9922f33485..3b66b4f2dd 100644
--- a/libavcodec/webvttenc.c
+++ b/libavcodec/webvttenc.c
@@ -38,10 +38,7 @@ typedef struct {
     int stack_ptr;
 } WebVTTContext;
 
-#ifdef __GNUC__
-__attribute__ ((__format__ (__printf__, 2, 3)))
-#endif
-static void webvtt_print(WebVTTContext *s, const char *str, ...)
+static av_printf_format(2, 3) void webvtt_print(WebVTTContext *s, const char *str, ...)
 {
     va_list vargs;
     va_start(vargs, str);
-- 
2.34.1



More information about the ffmpeg-devel mailing list