Fix cpp warnings