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

Here are a few compiler warning fixes- this gives a clean build with gcc 4.9.1 from ubuntu 14.10.