From ed41ff40b9e1bff357b52394dcfa1107dc4ada74 Mon Sep 17 00:00:00 2001
From: Carl Eugen Hoyos <ceffmpeg@gmail.com>
Date: Fri, 1 May 2020 23:54:24 +0200
Subject: [PATCH] lavfi/signature: Fix a cast of a funtion pointer.
Fixes the following pedantic warning:
libavfilter/vf_signature.c:294:69: warning: ISO C forbids conversion of function pointer to object pointer type
---
libavfilter/vf_signature.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
@@ -291,7 +291,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *picref)
}
/* get threshold */
- qsort(sortsignature, elemcat->elem_count, sizeof(uint64_t), (void*) cmp);
+ qsort(sortsignature, elemcat->elem_count, sizeof(uint64_t), (int (*)(const void *, const void *))cmp);
th = sortsignature[(int) (elemcat->elem_count*0.333)];
/* ternarize */
@@ -317,7 +317,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *picref)
}
/* confidence */
- qsort(conflist, DIFFELEM_SIZE, sizeof(uint64_t), (void*) cmp);
+ qsort(conflist, DIFFELEM_SIZE, sizeof(uint64_t), (int (*)(const void *, const void *))cmp);
fs->confidence = FFMIN(conflist[DIFFELEM_SIZE/2], 255);
/* coarsesignature */
--
2.24.1