Fix warning and add warning related gcc options