diff options
author | Ganesh Ajjanagadde <gajjanagadde@gmail.com> | 2015-10-24 20:59:05 -0400 |
---|---|---|
committer | Ganesh Ajjanagadde <gajjanagadde@gmail.com> | 2015-10-25 10:07:20 -0400 |
commit | c7131762c021a3e5073f30e144ab3790177e8920 (patch) | |
tree | 3adfaa41083dc3e0820518e4cde7e7372e18807a /libswresample | |
parent | f7751a5e5368bfa99867404a85ae17f0cadc78f0 (diff) | |
download | ffmpeg-c7131762c021a3e5073f30e144ab3790177e8920.tar.gz |
all: add const-correctness to qsort comparators
This adds const-correctness when needed for the comparators.
Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Diffstat (limited to 'libswresample')
-rw-r--r-- | libswresample/swresample-test.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libswresample/swresample-test.c b/libswresample/swresample-test.c index 9caa750750..0aa47c8d28 100644 --- a/libswresample/swresample-test.c +++ b/libswresample/swresample-test.c @@ -138,8 +138,8 @@ static void setup_array(uint8_t *out[SWR_CH_MAX], uint8_t *in, enum AVSampleForm } } -static int cmp(const int *a, const int *b){ - return *a - *b; +static int cmp(const void *a, const void *b){ + return *(const int *)a - *(const int *)b; } static void audiogen(void *data, enum AVSampleFormat sample_fmt, @@ -271,7 +271,7 @@ int main(int argc, char **argv){ r = (seed * (uint64_t)(max_tests - test)) >>32; FFSWAP(int, remaining_tests[r], remaining_tests[max_tests - test - 1]); } - qsort(remaining_tests + max_tests - num_tests, num_tests, sizeof(remaining_tests[0]), (void*)cmp); + qsort(remaining_tests + max_tests - num_tests, num_tests, sizeof(remaining_tests[0]), cmp); in_sample_rate=16000; for(test=0; test<num_tests; test++){ char in_layout_string[256]; |