[FFmpeg-cvslog] all: Replace __FUNCTION__ by __func__

Andreas Rheinhardt git at videolan.org
Thu Sep 7 02:19:29 EEST 2023


ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Sun Sep  3 01:06:42 2023 +0200| [e999a09f191b1fe02aea4c634e732057b334a273] | committer: Andreas Rheinhardt

all: Replace __FUNCTION__ by __func__

Only the latter is valid ISO C.

Reviewed-by: James Almer <jamrial at gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e999a09f191b1fe02aea4c634e732057b334a273
---

 libavdevice/opengl_enc.c | 2 +-
 libavformat/apngdec.c    | 2 +-
 libavformat/demux.c      | 4 ++--
 libavformat/mux.c        | 2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/libavdevice/opengl_enc.c b/libavdevice/opengl_enc.c
index 80feda7072..b2ac6eb16a 100644
--- a/libavdevice/opengl_enc.c
+++ b/libavdevice/opengl_enc.c
@@ -152,7 +152,7 @@ typedef struct FFOpenGLFunctions {
 {\
     GLenum err_code; \
     if ((err_code = glGetError()) != GL_NO_ERROR) { \
-        av_log(ctx, AV_LOG_ERROR, "OpenGL error occurred in '%s', line %d: %d\n", __FUNCTION__, __LINE__, err_code); \
+        av_log(ctx, AV_LOG_ERROR, "OpenGL error occurred in '%s', line %d: %d\n", __func__, __LINE__, err_code); \
         goto fail; \
     } \
 }\
diff --git a/libavformat/apngdec.c b/libavformat/apngdec.c
index 47cdbfcbfb..8f5f37a2b1 100644
--- a/libavformat/apngdec.c
+++ b/libavformat/apngdec.c
@@ -274,7 +274,7 @@ static int decode_fctl_chunk(AVFormatContext *s, APNGDemuxContext *ctx, AVPacket
             "delay_den: %"PRIu16", "
             "dispose_op: %d, "
             "blend_op: %d\n",
-            __FUNCTION__,
+            __func__,
             sequence_number,
             width,
             height,
diff --git a/libavformat/demux.c b/libavformat/demux.c
index fcd5daf699..6decb08698 100644
--- a/libavformat/demux.c
+++ b/libavformat/demux.c
@@ -2533,7 +2533,7 @@ int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options)
             if (codec && !avctx->codec)
                 if (avcodec_open2(avctx, codec, options ? &options[i] : &thread_opt) < 0)
                     av_log(ic, AV_LOG_WARNING,
-                           "Failed to open codec in %s\n",__FUNCTION__);
+                           "Failed to open codec in %s\n", __func__);
         }
         if (!options)
             av_dict_free(&thread_opt);
@@ -2790,7 +2790,7 @@ int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options)
                         av_dict_set(&opts, "codec_whitelist", ic->codec_whitelist, 0);
                     if (avcodec_open2(avctx, codec, (options && stream_index < orig_nb_streams) ? &options[stream_index] : &opts) < 0)
                         av_log(ic, AV_LOG_WARNING,
-                               "Failed to open codec in %s\n",__FUNCTION__);
+                               "Failed to open codec in %s\n", __func__);
                     av_dict_free(&opts);
                 }
             }
diff --git a/libavformat/mux.c b/libavformat/mux.c
index 0cf9ebfc19..6c6c677171 100644
--- a/libavformat/mux.c
+++ b/libavformat/mux.c
@@ -1120,7 +1120,7 @@ static int write_packet_common(AVFormatContext *s, AVStream *st, AVPacket *pkt,
     int ret;
 
     if (s->debug & FF_FDEBUG_TS)
-        av_log(s, AV_LOG_DEBUG, "%s size:%d dts:%s pts:%s\n", __FUNCTION__,
+        av_log(s, AV_LOG_DEBUG, "%s size:%d dts:%s pts:%s\n", __func__,
                pkt->size, av_ts2str(pkt->dts), av_ts2str(pkt->pts));
 
     guess_pkt_duration(s, st, pkt);



More information about the ffmpeg-cvslog mailing list