Fix a few GCC warnings on Linux (GCC 4.6)

develop
lethosor 2015-11-05 21:48:13 -05:00
parent 2f8f5b071a
commit 867b733a04
2 changed files with 3 additions and 2 deletions

@ -201,7 +201,7 @@ google/protobuf/compiler/zip_writer.cc
LIST(APPEND LIBPROTOBUF_FULL_SRCS ${LIBPROTOBUF_LITE_SRCS}) LIST(APPEND LIBPROTOBUF_FULL_SRCS ${LIBPROTOBUF_LITE_SRCS})
IF(CMAKE_COMPILER_IS_GNUCC) IF(CMAKE_COMPILER_IS_GNUCC)
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -Wno-sign-compare") SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -Wno-sign-compare -Wno-unused-result")
ENDIF() ENDIF()
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})

@ -114,7 +114,8 @@ static int (*_SDL_Init)(uint32_t flags) = 0;
DFhackCExport int SDL_Init(uint32_t flags) DFhackCExport int SDL_Init(uint32_t flags)
{ {
// reroute stderr // reroute stderr
freopen("stderr.log", "w", stderr); if (!freopen("stderr.log", "w", stderr))
fprintf(stderr, "dfhack: failed to reroute stderr\n");
// we don't reroute stdout until we figure out if this should be done at all // we don't reroute stdout until we figure out if this should be done at all
// See: Console-linux.cpp // See: Console-linux.cpp