Add void keyword to function prototypes without arguments/parameters. Patch by Ragnor.
Remove unnecessary casts. Patch by Ragnor.