aboutsummaryrefslogtreecommitdiffstats
path: root/tests/checkasm/checkasm.c
diff options
context:
space:
mode:
authorHenrik Gramner <henrik@gramner.com>2015-08-20 17:06:21 +0200
committerAnton Khirnov <anton@khirnov.net>2015-08-20 19:22:34 +0200
commit515b69f8f8e9a24cfaee95d8c1f63f265d8582fe (patch)
tree1557dcac028fa877745a1ad9c045df339047cf05 /tests/checkasm/checkasm.c
parente13da244f41610ee073b2f72bcf62b60fa402bb5 (diff)
downloadffmpeg-515b69f8f8e9a24cfaee95d8c1f63f265d8582fe.tar.gz
checkasm: Explicitly declare function prototypes
Now we no longer have to rely on function pointers intentionally declared without specified argument types. This makes it easier to support functions with floating point parameters or return values as well as functions returning 64-bit values on 32-bit architectures. It also avoids having to explicitly cast strides to ptrdiff_t for example. Signed-off-by: Anton Khirnov <anton@khirnov.net>
Diffstat (limited to 'tests/checkasm/checkasm.c')
-rw-r--r--tests/checkasm/checkasm.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/checkasm/checkasm.c b/tests/checkasm/checkasm.c
index b564e7e988..a120bc3d3c 100644
--- a/tests/checkasm/checkasm.c
+++ b/tests/checkasm/checkasm.c
@@ -111,7 +111,7 @@ static const struct {
typedef struct CheckasmFuncVersion {
struct CheckasmFuncVersion *next;
- intptr_t (*func)();
+ void *func;
int ok;
int cpu;
int iterations;
@@ -387,10 +387,10 @@ int main(int argc, char *argv[])
/* Decide whether or not the specified function needs to be tested and
* allocate/initialize data structures if needed. Returns a pointer to a
* reference function if the function should be tested, otherwise NULL */
-intptr_t (*checkasm_check_func(intptr_t (*func)(), const char *name, ...))()
+void *checkasm_check_func(void *func, const char *name, ...)
{
char name_buf[256];
- intptr_t (*ref)() = func;
+ void *ref = func;
CheckasmFuncVersion *v;
int name_length;
va_list arg;