[FFmpeg-cvslog] ratecontrol: Use correct function pointer casts instead of void*

Diego Biurrun git at videolan.org
Fri Mar 31 22:21:37 EEST 2017


ffmpeg | branch: master | Diego Biurrun <diego at biurrun.de> | Fri Mar 13 00:36:41 2015 +0100| [3b50dbc51fb0978d09c1a5b83d4bf5a59d170e1e] | committer: Diego Biurrun

ratecontrol: Use correct function pointer casts instead of void*

libavcodec/ratecontrol.c:120:9: warning: ISO C forbids initialization between function pointer and ‘void *’ [-Wpedantic]
libavcodec/ratecontrol.c:121:9: warning: ISO C forbids initialization between function pointer and ‘void *’ [-Wpedantic]

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

 libavcodec/ratecontrol.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavcodec/ratecontrol.c b/libavcodec/ratecontrol.c
index 78a438f..097da2e 100644
--- a/libavcodec/ratecontrol.c
+++ b/libavcodec/ratecontrol.c
@@ -472,8 +472,8 @@ av_cold int ff_rate_control_init(MpegEncContext *s)
         NULL
     };
     static double (* const func1[])(void *, double) = {
-        (void *)bits2qp,
-        (void *)qp2bits,
+        (double (*)(void *, double)) bits2qp,
+        (double (*)(void *, double)) qp2bits,
         NULL
     };
     static const char * const func1_names[] = {



More information about the ffmpeg-cvslog mailing list