Minor warning fixes and clang support.

Some of the changes fix warnings on `-Wall -Wextra` levels in clang. Even though you're aggressively using unused parameters, so add `-Wno-unused-parameter`, otherwise you'll be spammed with warnings.

I haven't added these flags intentionally, do you think it's worth enabling them? There is a bunch of warnings left in 3rd party code (stb_image.h). Other than that you are almost free from warnings with `-Wall -Wextra -Wno-unused-parameter` flag setup.

And of course if you disagree with some of the changes, just let me know, I can split the pull request for you and all that.