corrected some g++ warnings, now compiles cleanly with 4.8.3