"tests/pipelines/vscode:/vscode.git/clone" did not exist on "318556b20e8fff45ccfb4a0004e513ee4c2d73eb"
Commit b869aab8 authored by jbeder's avatar jbeder
Browse files

Updated to remove most of the warnings in Visual Studio. (There's still the...

Updated to remove most of the warnings in Visual Studio. (There's still the one about all control paths returning a value left.) Fixed one warning (when an istream converts to void * to then convert to bool), and disabled three.
parent 3720ceb5
...@@ -13,6 +13,11 @@ if(CMAKE_COMPILER_IS_GNUCC) ...@@ -13,6 +13,11 @@ if(CMAKE_COMPILER_IS_GNUCC)
set(CMAKE_CXX_FLAGS "-O2 -Wall -Wextra -pedantic -Wno-long-long ${CMAKE_CXX_FLAGS}") set(CMAKE_CXX_FLAGS "-O2 -Wall -Wextra -pedantic -Wno-long-long ${CMAKE_CXX_FLAGS}")
endif(CMAKE_COMPILER_IS_GNUCC) endif(CMAKE_COMPILER_IS_GNUCC)
if(MSVC)
set(LIB_TYPE) # I can't figure out how CMake handles Windows shared libraries
set(CMAKE_CXX_FLAGS "/W3 /wd4127 /wd4355 /D_SCL_SECURE_NO_WARNINGS ${CMAKE_CXX_FLAGS}")
endif(MSVC)
set(YAML_CPP_VERSION_MAJOR "0") set(YAML_CPP_VERSION_MAJOR "0")
set(YAML_CPP_VERSION_MINOR "2") set(YAML_CPP_VERSION_MINOR "2")
set(YAML_CPP_VERSION_PATCH "4") set(YAML_CPP_VERSION_PATCH "4")
......
...@@ -23,7 +23,8 @@ namespace YAML ...@@ -23,7 +23,8 @@ namespace YAML
inline bool Convert(const std::string& input, T& output, typename enable_if<is_numeric<T> >::type * = 0) { inline bool Convert(const std::string& input, T& output, typename enable_if<is_numeric<T> >::type * = 0) {
std::stringstream stream(input); std::stringstream stream(input);
stream.unsetf(std::ios::dec); stream.unsetf(std::ios::dec);
return stream >> output; stream >> output;
return !!stream;
} }
} }
......
...@@ -20,7 +20,7 @@ namespace YAML ...@@ -20,7 +20,7 @@ namespace YAML
class Content; class Content;
class Scanner; class Scanner;
class Emitter; class Emitter;
class ParserState; struct ParserState;
enum CONTENT_TYPE { CT_NONE, CT_SCALAR, CT_SEQUENCE, CT_MAP }; enum CONTENT_TYPE { CT_NONE, CT_SCALAR, CT_SEQUENCE, CT_MAP };
......
...@@ -52,9 +52,10 @@ namespace YAML ...@@ -52,9 +52,10 @@ namespace YAML
int operator,(flag, flag); int operator,(flag, flag);
template<typename T> template<typename T>
void operator,(flag, T const&); char operator,(flag, T const&);
char operator,(int, flag); char operator,(int, flag);
int operator,(char, flag);
} }
template <typename T> template <typename T>
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
namespace YAML namespace YAML
{ {
class Scanner; class Scanner;
class ParserState; struct ParserState;
struct Token; struct Token;
class Parser: private noncopyable class Parser: private noncopyable
......
...@@ -39,6 +39,7 @@ ...@@ -39,6 +39,7 @@
/> />
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
AdditionalOptions="/D_SCL_SECURE_NO_WARNINGS"
Optimization="0" Optimization="0"
AdditionalIncludeDirectories="include" AdditionalIncludeDirectories="include"
MinimalRebuild="true" MinimalRebuild="true"
...@@ -46,6 +47,7 @@ ...@@ -46,6 +47,7 @@
RuntimeLibrary="3" RuntimeLibrary="3"
WarningLevel="3" WarningLevel="3"
DebugInformationFormat="4" DebugInformationFormat="4"
DisableSpecificWarnings="4127;4355"
/> />
<Tool <Tool
Name="VCManagedResourceCompilerTool" Name="VCManagedResourceCompilerTool"
......
...@@ -39,6 +39,7 @@ ...@@ -39,6 +39,7 @@
/> />
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
AdditionalOptions="/D_SCL_SECURE_NO_WARNINGS"
Optimization="0" Optimization="0"
AdditionalIncludeDirectories="include" AdditionalIncludeDirectories="include"
MinimalRebuild="true" MinimalRebuild="true"
...@@ -46,6 +47,7 @@ ...@@ -46,6 +47,7 @@
RuntimeLibrary="3" RuntimeLibrary="3"
WarningLevel="3" WarningLevel="3"
DebugInformationFormat="4" DebugInformationFormat="4"
DisableSpecificWarnings="4127;4355"
/> />
<Tool <Tool
Name="VCManagedResourceCompilerTool" Name="VCManagedResourceCompilerTool"
......
...@@ -40,6 +40,7 @@ ...@@ -40,6 +40,7 @@
/> />
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
AdditionalOptions="/D_SCL_SECURE_NO_WARNINGS"
Optimization="0" Optimization="0"
AdditionalIncludeDirectories="include" AdditionalIncludeDirectories="include"
PreprocessorDefinitions="WIN32;_DEBUG;_LIB" PreprocessorDefinitions="WIN32;_DEBUG;_LIB"
...@@ -49,6 +50,7 @@ ...@@ -49,6 +50,7 @@
UsePrecompiledHeader="0" UsePrecompiledHeader="0"
WarningLevel="4" WarningLevel="4"
DebugInformationFormat="3" DebugInformationFormat="3"
DisableSpecificWarnings="4127;4355"
/> />
<Tool <Tool
Name="VCManagedResourceCompilerTool" Name="VCManagedResourceCompilerTool"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment