1
0
mirror of https://github.com/gryf/wmaker.git synced 2026-01-09 15:24:12 +01:00

WINGs: Removed cast to change function prototype

When a function is used as a call-back, it is dangerous to have
arguments with a type different than what is expected by the
call-back definition.

This patch sets the argument list to match what is expected by
the call-back prototype and inserts an explicit type conversion
at the beginning of the function.
This commit is contained in:
Christophe CURIS
2013-05-12 00:24:46 +02:00
committed by Carlos R. Mafra
parent bab90b2168
commit e2d816c7a2
5 changed files with 26 additions and 21 deletions

View File

@@ -52,7 +52,7 @@ static void defaultHandler(int bla)
exit(1);
}
static waborthandler *aborthandler = (waborthandler *) defaultHandler;
static waborthandler *aborthandler = defaultHandler;
#define wAbort(a) (*aborthandler)(a)