Fixing clang only warnings

This commit is contained in:
Nado 2015-11-12 22:07:59 +01:00
parent 708608177a
commit 97de0cbc34
2 changed files with 9 additions and 3 deletions

View File

@ -25,8 +25,14 @@ elseif(MINGW)
add_definitions(-D_IRR_STATIC_LIB_)
add_definitions(-D_CRT_SECURE_NO_WARNINGS) # Shut up about unsafe stuff
else()
set(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -Wall -pipe -O3 -fno-exceptions -fstrict-aliasing -fexpensive-optimizations -I/usr/X11R6/include")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -pipe -O3 -fno-exceptions -fstrict-aliasing -fexpensive-optimizations -I/usr/X11R6/include")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -pipe -O3 -fno-exceptions -fstrict-aliasing -I/usr/X11R6/include")
set(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -Wall -pipe -O3 -fno-exceptions -fstrict-aliasing -I/usr/X11R6/include")
if(CMAKE_COMPILER_IS_GNUCC)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fexpensive-optimizations")
endif()
if(CMAKE_COMPILER_IS_GNUCXX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fexpensive-optimizations")
endif()
endif()
# Xrandr

View File

@ -275,7 +275,7 @@ void History::Load()
// Optional (not supported in older history files): include reverse
fgets(s, 1023, fd);
char r;
if (!sscanf(s, "reverse: %c", &r) != 1)
if (sscanf(s, "reverse: %c", &r) == 1)
{
fgets(s, 1023, fd);
race_manager->setReverseTrack(r == 'y');