Move warning flags to proper place
Cleans unitialized warnings in wxApps
This commit is contained in:
parent
54aaade47e
commit
7e3a338518
|
@ -272,9 +272,6 @@ endif(USE_DISTCC)
|
|||
|
||||
if( CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang" )
|
||||
|
||||
# Add additional warning flags to avoid signed/unsigned comparison
|
||||
set( CMAKE_CXX_FLAGS "-Wsign-compare" )
|
||||
|
||||
# Set 32-bit flag for GCC to prevent excess precision
|
||||
if( CMAKE_SIZEOF_VOID_P EQUAL 4 )
|
||||
set( CMAKE_CXX_FLAGS "-ffloat-store ${CMAKE_CXX_FLAGS}" )
|
||||
|
|
|
@ -115,4 +115,22 @@ if( CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang" )
|
|||
message( STATUS "Enabling warning -Wshadow" )
|
||||
endif()
|
||||
|
||||
|
||||
# Add additional warning flags to avoid signed/unsigned comparison
|
||||
CHECK_CXX_COMPILER_FLAG( "-Wsign-compare" COMPILER_SUPPORTS_WSIGN )
|
||||
|
||||
if( COMPILER_SUPPORTS_WSIGN )
|
||||
set( WARN_FLAGS_CXX "${WARN_FLAGS_CXX} -Wsign-compare" )
|
||||
message( STATUS "Enabling warning -Wsign-compare" )
|
||||
endif()
|
||||
|
||||
# Warn about missing initializers in construction
|
||||
CHECK_CXX_COMPILER_FLAG( "-Wmissing-field-initializers" COMPILER_SUPPORTS_WMISSING_INIT )
|
||||
|
||||
if( COMPILER_SUPPORTS_WMISSING_INIT )
|
||||
set( WARN_FLAGS_CXX "${WARN_FLAGS_CXX} -Wmissing-field-initializers" )
|
||||
message( STATUS "Enabling warning -Wmissing-field-initializers" )
|
||||
endif()
|
||||
|
||||
|
||||
endif()
|
||||
|
|
|
@ -318,10 +318,10 @@ bool PGM_SINGLE_TOP::OnPgmInit()
|
|||
#endif
|
||||
|
||||
static const wxCmdLineEntryDesc desc[] = {
|
||||
{ wxCMD_LINE_OPTION, "f", "frame", "Frame to load" },
|
||||
{ wxCMD_LINE_OPTION, "f", "frame", "Frame to load", wxCMD_LINE_VAL_STRING, 0 },
|
||||
{ wxCMD_LINE_PARAM, nullptr, nullptr, "File to load", wxCMD_LINE_VAL_STRING,
|
||||
wxCMD_LINE_PARAM_MULTIPLE | wxCMD_LINE_PARAM_OPTIONAL },
|
||||
{ wxCMD_LINE_NONE }
|
||||
{ wxCMD_LINE_NONE, nullptr, nullptr, nullptr, wxCMD_LINE_VAL_NONE, 0 }
|
||||
};
|
||||
|
||||
wxCmdLineParser parser( App().argc, App().argv );
|
||||
|
|
|
@ -94,7 +94,7 @@ static const wxCmdLineEntryDesc cmdLineDesc[] =
|
|||
wxCMD_LINE_VAL_NONE, wxCMD_LINE_PARAM_OPTIONAL },
|
||||
{ wxCMD_LINE_SWITCH, "h", NULL, "display this message",
|
||||
wxCMD_LINE_VAL_NONE, wxCMD_LINE_OPTION_HELP },
|
||||
{ wxCMD_LINE_NONE }
|
||||
{ wxCMD_LINE_NONE, nullptr, nullptr, nullptr, wxCMD_LINE_VAL_NONE, 0 }
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -116,7 +116,7 @@ static const wxCmdLineEntryDesc cmdLineDesc[] =
|
|||
wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL },
|
||||
{ wxCMD_LINE_SWITCH, "h", NULL, _( "display this message" ).mb_str(),
|
||||
wxCMD_LINE_VAL_NONE, wxCMD_LINE_OPTION_HELP },
|
||||
{ wxCMD_LINE_NONE }
|
||||
{ wxCMD_LINE_NONE, nullptr, nullptr, nullptr, wxCMD_LINE_VAL_NONE, 0 }
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue