FFmpeg/libswscale
Andreas Rheinhardt 2fae000994 swscale/vscale: Increase type strictness
libswscale/vscale.c makes extensive use of function pointers and in
doing so it converts these function pointers to and from a pointer to
void. Yet this is actually against the C standard:
C90 only guarantees that one can convert a pointer to any incomplete
type or object type to void* and back with the result comparing equal
to the original which makes pointers to void generic pointers to
incomplete or object type. Yet C90 lacks a generic function pointer
type.
C99 additionally guarantees that a pointer to a function of one type may
be converted to a pointer to a function of another type with the result
and the original comparing equal when converting back.
This makes any function pointer type a generic function pointer type.
Yet even this does not make pointers to void generic function pointers.

Both GCC and Clang emit warnings for this when in pedantic mode.

This commit fixes this by using a union that can hold one member of any
of the required function pointer types to store the function pointer.
This works even for C90.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-04-27 23:34:31 +02:00
..
aarch64 swscale: aarch64: Don't clobber callee-saved registers v8-v15 2020-04-21 23:41:13 +03:00
arm arm: swscale: Only compile the rgb2yuv asm if .dn aliases are supported 2018-03-31 21:54:56 +03:00
ppc swscale: Fix AltiVec/VSX build with recent GCC 2019-10-04 08:58:17 +03:00
tests swscale/tests/swscale: Lengthen pixfmt name buffer to 21 bytes 2019-05-13 13:39:49 +02:00
x86 swscale/swscale: remove useless code 2020-04-03 00:58:07 +02:00
alphablend.c
bayer_template.c
gamma.c
hscale_fast_bilinear.c
hscale.c
input.c lsws/input: Do not change transparency range. 2020-03-11 22:55:49 +01:00
libswscale.v
log2_tab.c
Makefile Merge commit '92db5083077a8b0f8e1050507671b456fd155125' 2017-05-04 19:59:30 -03:00
options.c swscale/options: Use AV_OPT_TYPE_PIXEL_FMT 2016-11-20 13:00:22 +01:00
output.c swscale/output: Fix integer overflow in yuv2rgb_write_full() with out of range input 2020-04-04 22:09:46 +02:00
rgb2rgb_template.c lsws/rgb2rgb_template: Do not compile unneeded shuffle functions on big-endian. 2018-06-10 03:22:59 +02:00
rgb2rgb.c swscale/rgb : move shuffle func shuffle_bytes_1230, shuffle_bytes_3012, shuffle_bytes_3210 in order to add SIMD 2018-03-24 20:22:02 +01:00
rgb2rgb.h swscale/rgb2rgb : cosmetic, move shuffle_bytes func declaration 2018-03-24 20:22:17 +01:00
slice.c lsws/slice: Move a misplaced const. 2017-03-08 00:33:21 +01:00
swscale_internal.h swscale/swscale: remove useless code 2020-04-03 00:58:07 +02:00
swscale_unscaled.c swscale/swscale_unscaled: add AV_PIX_FMT_GBRAP10 for LE and BE conversion wrapper 2019-12-10 16:09:14 +01:00
swscale.c swscale/swscale: remove useless code 2020-04-03 00:58:07 +02:00
swscale.h doxygen: Standardize root-level modules 2016-08-02 22:15:25 -07:00
swscaleres.rc
utils.c swscale: Add swscale input support for Y210LE 2020-02-24 00:09:51 +00:00
version.h lsws/input: Do not change transparency range. 2020-03-11 22:55:49 +01:00
vscale.c swscale/vscale: Increase type strictness 2020-04-27 23:34:31 +02:00
yuv2rgb.c swscale/yuv2rgb: Fix vertical dither offset with slices 2020-04-12 16:36:47 +02:00