ratecontrol: Use correct function pointer casts instead of void*
authorDiego Biurrun <diego@biurrun.de>
Thu, 12 Mar 2015 23:36:41 +0000 (00:36 +0100)
committerDiego Biurrun <diego@biurrun.de>
Sat, 12 Nov 2016 15:47:06 +0000 (16:47 +0100)
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]

libavcodec/ratecontrol.c

index 78a438f..097da2e 100644 (file)
@@ -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[] = {