Work around gcc warning about function pointers conversions.
Work around harmless (at least under POSIX systems where function pointers are guaranteed to have the same representation as object pointers) but annoying warnings given by gcc when converting between function and object pointers, e.g. Source/DOH/fio.c: In function 'DohEncoding': Source/DOH/fio.c:51: warning: ISO C forbids conversion of function pointer to object pointer type Source/DOH/fio.c: In function 'encode': Source/DOH/fio.c:75: warning: ISO C forbids conversion of object pointer to function pointer type Source/DOH/base.c: In function 'DohCall': Source/DOH/base.c:952: warning: ISO C forbids conversion of object pointer to function pointer type Use an extra level of pointer indirection to avoid them.
This commit is contained in:
parent
90eb5f9095
commit
40bf877499
2 changed files with 3 additions and 3 deletions
|
|
@ -949,7 +949,7 @@ DOH *DohCall(DOH *func, DOH *args) {
|
|||
DOH *result;
|
||||
DOH *(*builtin) (DOH *);
|
||||
|
||||
builtin = (DOH *(*)(DOH *)) GetVoid(func, "builtin");
|
||||
*(void **)(&builtin) = GetVoid(func, "builtin");
|
||||
if (!builtin)
|
||||
return 0;
|
||||
result = (*builtin) (args);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue