Fix the most of minor issues that cause warnings during build with g++