Fix to remove -fpermissive,
The fix contain a lot of (cast)