fix a bunch of compiler warnings due to -Wunused-result
Merge pull request #113 from mostynb/fix_unused_result_compiler_warnings

fix a bunch of compiler warnings due to -Wunused-result