test: fix compilation with newer SDCC
authorAlan Cox <alan@linux.intel.com>
Fri, 13 Oct 2017 19:30:22 +0000 (20:30 +0100)
committerAlan Cox <alan@linux.intel.com>
Fri, 13 Oct 2017 19:30:22 +0000 (20:30 +0100)
void * and function types don't mix in strict interpretations of C (think about
split I/D for one)

Patch from Philipp Klaus Krause.

Applications/MWC/cmd/test.c

index a7e7b7e..beafc37 100644 (file)
@@ -198,9 +198,9 @@ STRING_UNOP(strfile_executable)
 
 struct op {
        const char *op_name;
-       void *op_func;
+       void (*op_func)(void);
 };
-#define        OP(name,func)   { name, (void *)func }
+#define        OP(name,func)   { name, (void (*)(void *))func }
 
 const struct op string_binop[] = {
        OP("=", cmp_eq), OP("!=", cmp_neq), OP("<", cmp_lt),