diff options
author | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2020-08-25 00:55:56 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2020-08-26 23:52:56 +0200 |
commit | e07541930a8a045f1924152e12f8615043480b6f (patch) | |
tree | c1a8cb7730d14463c10d69c7e5f21eca8418b649 /libavformat/flic.c | |
parent | 16ea88778e6f4e2d49318ea6e02fa938ac2f401e (diff) | |
download | ffmpeg-e07541930a8a045f1924152e12f8615043480b6f.tar.gz |
avfilter/vf_signature: Avoid cast from function pointer to void*
The signature filter uses qsort, but its compare function doesn't have
the signature required of such a function; therefore it casts the
function pointer to void. Yet this is wrong:
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 modifying the compare function to comply with
the expected signature.
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'libavformat/flic.c')
0 files changed, 0 insertions, 0 deletions