Fix cpp compiler warnings, thanks @hroest