Fixed various warnings found by newer gcc

I assume newer gcc in Ubuntu 14.04 catches them.
Build with Ruby 1.9.1

This is the default interpreter for Ubuntu 14.04