Various minor fixes that get rid of warnings when compiling on linux

3b1480f is potentially serious as stb_fullpath() reads the first character of its first argument, which at this point contains random stack data.

The rest are mainly silencing warnings.