summaryrefslogtreecommitdiff
path: root/libavformat
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/avio.h12
-rw-r--r--libavformat/internal.h2
-rw-r--r--libavformat/rtpproto.c2
3 files changed, 4 insertions, 12 deletions
diff --git a/libavformat/avio.h b/libavformat/avio.h
index e07e3c3c92..bb2d9f85a6 100644
--- a/libavformat/avio.h
+++ b/libavformat/avio.h
@@ -284,11 +284,7 @@ attribute_deprecated int64_t url_fsize(AVIOContext *s);
#define URL_EOF (-1)
attribute_deprecated int url_fgetc(AVIOContext *s);
attribute_deprecated int url_setbufsize(AVIOContext *s, int buf_size);
-#ifdef __GNUC__
-attribute_deprecated int url_fprintf(AVIOContext *s, const char *fmt, ...) __attribute__ ((__format__ (__printf__, 2, 3)));
-#else
-attribute_deprecated int url_fprintf(AVIOContext *s, const char *fmt, ...);
-#endif
+attribute_deprecated int url_fprintf(AVIOContext *s, const char *fmt, ...) av_printf_format(2, 3);
attribute_deprecated void put_flush_packet(AVIOContext *s);
attribute_deprecated int url_open_dyn_buf(AVIOContext **s);
attribute_deprecated int url_open_dyn_packet_buf(AVIOContext **s, int max_packet_size);
@@ -463,11 +459,7 @@ static av_always_inline int64_t avio_tell(AVIOContext *s)
int64_t avio_size(AVIOContext *s);
/** @warning currently size is limited */
-#ifdef __GNUC__
-int avio_printf(AVIOContext *s, const char *fmt, ...) __attribute__ ((__format__ (__printf__, 2, 3)));
-#else
-int avio_printf(AVIOContext *s, const char *fmt, ...);
-#endif
+int avio_printf(AVIOContext *s, const char *fmt, ...) av_printf_format(2, 3);
void avio_flush(AVIOContext *s);
diff --git a/libavformat/internal.h b/libavformat/internal.h
index 7413b0906a..30faa00e95 100644
--- a/libavformat/internal.h
+++ b/libavformat/internal.h
@@ -108,7 +108,7 @@ uint64_t ff_ntp_time(void);
*/
int ff_url_join(char *str, int size, const char *proto,
const char *authorization, const char *hostname,
- int port, const char *fmt, ...);
+ int port, const char *fmt, ...) av_printf_format(7, 8);
/**
* Append the media-specific SDP fragment for the media stream c
diff --git a/libavformat/rtpproto.c b/libavformat/rtpproto.c
index 1340665c74..dba1d35b03 100644
--- a/libavformat/rtpproto.c
+++ b/libavformat/rtpproto.c
@@ -86,7 +86,7 @@ int rtp_set_remote_url(URLContext *h, const char *uri)
* "http://host:port/path?option1=val1&option2=val2...
*/
-static void url_add_option(char *buf, int buf_size, const char *fmt, ...)
+static av_printf_format(3, 4) void url_add_option(char *buf, int buf_size, const char *fmt, ...)
{
char buf1[1024];
va_list ap;