Commit 5dc58306 authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh

Mute MSVC safety warnings

Botan:
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xutility:2227:
warning: C4996: 'std::_Copy_impl': Function call with parameters that may be
unsafe - this call relies on the caller to check that the passed values are
correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See
documentation on how to use Visual C++ 'Checked Iterators'

c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\xutility:2212:
see declaration of 'std::_Copy_impl'

D:\dev\qt-creator\src\libs\3rdparty\botan\botan.cpp:7248: see reference
to function template instantiation
'_OutIt std::copy<const Botan::u32bit*,T*>(_InIt,_InIt,_OutIt)' being compiled
with
[
    _OutIt=Botan::word *,
    T=Botan::word,
    _InIt=const Botan::u32bit *
]

CppTools:
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xutility:2873:
warning: C4996: 'std::_Mismatch1': Function call with parameters that may be
unsafe - this call relies on the caller to check that the passed values are
correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See
documentation on how to use Visual C++ 'Checked Iterators'

C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\xutility:2856:
see declaration of 'std::_Mismatch1'

D:\dev\qt-creator\src\plugins\cpptools\symbolfinder.cpp:388: see reference to
function template instantiation 'std::pair<_Ty1,_Ty2>
std::mismatch<QString::const_iterator,QString::const_iterator>(_InIt1,_InIt1,_InIt2)'
being compiled
with
[
    _Ty1=QString::const_iterator,
    _Ty2=QString::const_iterator,
    _InIt1=QString::const_iterator,
    _InIt2=QString::const_iterator
]

Change-Id: I09a477e755c4555101b064271f10c08a69576e33
Reviewed-by: default avatarChristian Kandeler <christian.kandeler@digia.com>
Reviewed-by: default avatarDavid Schulz <david.schulz@digia.com>
Reviewed-by: default avatarNikolai Kosjar <nikolai.kosjar@digia.com>
parent 3fbeca21
......@@ -36,7 +36,7 @@ win32 {
win32-msvc* {
QMAKE_CXXFLAGS += -wd4251 -wd4290 -wd4250
DEFINES += BOTAN_BUILD_COMPILER_IS_MSVC BOTAN_TARGET_OS_HAS_GMTIME_S
DEFINES += BOTAN_BUILD_COMPILER_IS_MSVC BOTAN_TARGET_OS_HAS_GMTIME_S _SCL_SECURE_NO_WARNINGS
} else {
QMAKE_CFLAGS += -fpermissive -finline-functions -Wno-long-long
QMAKE_CXXFLAGS += -fpermissive -finline-functions -Wno-long-long
......
......@@ -72,7 +72,9 @@ QtcLibrary {
} else {
result.push("BOTAN_DLL=")
if (qbs.toolchain.contains("msvc"))
result.push("BOTAN_BUILD_COMPILER_IS_MSVC", "BOTAN_TARGET_OS_HAS_GMTIME_S")
result.push("BOTAN_BUILD_COMPILER_IS_MSVC",
"BOTAN_TARGET_OS_HAS_GMTIME_S",
"_SCL_SECURE_NO_WARNINGS")
if (qbs.toolchain.contains("gcc") || qbs.toolchain.contains("mingw"))
result.push("BOTAN_BUILD_COMPILER_IS_GCC")
if (qbs.targetOS.contains("linux"))
......
include(../../qtcreatorplugin.pri)
DEFINES += CPPTOOLS_LIBRARY
win32-msvc*:DEFINES += _SCL_SECURE_NO_WARNINGS
HEADERS += completionsettingspage.h \
cppclassesfilter.h \
cppcurrentdocumentfilter.h \
......
......@@ -15,6 +15,12 @@ QtcPlugin {
Depends { name: "CPlusPlus" }
Depends { name: "LanguageUtils" }
cpp.defines: base
Properties {
condition: qbs.toolchain.contains("msvc")
cpp.defines: base.concat("_SCL_SECURE_NO_WARNINGS")
}
files: [
"abstracteditorsupport.cpp",
"abstracteditorsupport.h",
......
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