wmaker: replaced dangerous function type conversion by argument conversion
commit894d3e89bfeaa628e4d4a8a7f6707cc9582f4535
authorChristophe CURIS <christophe.curis@free.fr>
Sat, 15 Nov 2014 18:40:35 +0000 (15 19:40 +0100)
committerCarlos R. Mafra <crmafra@gmail.com>
Sun, 23 Nov 2014 22:42:19 +0000 (23 22:42 +0000)
tree4e4e2f2e5015e8fc502bbcb962cd208631edff92
parentf60f14b7bdaeb9c2bc978d7e5207141245d3abd0
wmaker: replaced dangerous function type conversion by argument conversion

A type conversion applied to a function when used as a pointer is dangerous
because the compiler may not be able to make sure arguments will be
compatible across architectures, so it can crash the application.

This is replaced by a function prototype matching exactly what is expected
for the callback, and have the type conversion on the argument done inside
the function so the compiler have complete liberty to generate any code
needed to handle it safely.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
src/menu.c