Fix some compiler warnings

Just fixing up the GCC compiler warnings I ran into.

I set-up warning log messages for the unused result warnings, as they were all "make sure to check this call for errors" type warnings.