Fixed: More compiler warnings

Set-but-unused variables, checking fread() return values.

NOTE: A couple of potential bugs here need checking.