Fix Ubuntu build warnings by using gcc flag -Wno-unused-result