Commit 5a5acd66 authored by Orgad Shaneh's avatar Orgad Shaneh Committed by hjk
Browse files

Tests: Fix MSVC warnings



Change-Id: If7f67ffc68ef725554e9ebaf8a8db5a64b7309cb
Reviewed-by: default avatarNikolai Kosjar <nikolai.kosjar@theqtcompany.com>
Reviewed-by: default avatarhjk <hjk@theqtcompany.com>
parent ab372deb
......@@ -227,6 +227,7 @@ static QByteArray stripEncodingPrefixAndQuotationMarks(const QByteArray &literal
Q_ASSERT(firstQuotationMarkPosition != -1);
Q_ASSERT(lastQuotationMarkPosition == literal.size() - 1);
Q_ASSERT(firstQuotationMarkPosition < lastQuotationMarkPosition - 1);
Q_UNUSED(lastQuotationMarkPosition);
QByteArray result = literal.mid(firstQuotationMarkPosition + 1);
result.chop(1);
......
QTC_LIB_DEPENDS += utils
QTC_PLUGIN_DEPENDS += coreplugin
include(../qttest.pri)
include($$IDE_SOURCE_TREE/src/plugins/coreplugin/coreplugin_dependencies.pri)
include($$IDE_SOURCE_TREE/src/libs/utils/utils_dependencies.pri)
SOURCES += tst_externaltooltest.cpp \
$$IDE_SOURCE_TREE/src/plugins/coreplugin/externaltool.cpp
......
......@@ -7,4 +7,6 @@ QT += core
macx:CONFIG -= app_bundle
win32-msvc*:QMAKE_CXXFLAGS += -w4996
SOURCES += main.cpp
......@@ -3,7 +3,7 @@ TARGET = overlap
CONFIG += debug console
CONFIG -= qt
QMAKE_CXXFLAGS = -O0 -fno-builtin
!win32-msvc*:QMAKE_CXXFLAGS = -O0 -fno-builtin
macx:CONFIG -= app_bundle
......
......@@ -28,8 +28,6 @@
**
****************************************************************************/
#pragma GCC diagnostic ignored "-Wuninitialized"
int main()
{
bool b;
......
......@@ -3,7 +3,8 @@ TARGET = uninit1
CONFIG += debug console
CONFIG -= qt
QMAKE_CXXFLAGS = -O0
win32-msvc*:QMAKE_CXXFLAGS += -w4700
else:QMAKE_CXXFLAGS = -O0 -Wno-uninitialized
macx:CONFIG -= app_bundle
......
......@@ -28,8 +28,6 @@
**
****************************************************************************/
#pragma GCC diagnostic ignored "-Wuninitialized"
int main()
{
int *i;
......
......@@ -3,7 +3,8 @@ TARGET = uninit2
CONFIG += debug console
CONFIG -= qt
QMAKE_CXXFLAGS = -O0
win32-msvc*:QMAKE_CXXFLAGS += -w4700
else:QMAKE_CXXFLAGS = -O0 -Wno-uninitialized
macx:CONFIG -= app_bundle
......
......@@ -28,8 +28,6 @@
**
****************************************************************************/
#pragma GCC diagnostic ignored "-Wuninitialized"
int main()
{
int *i;
......
......@@ -3,7 +3,8 @@ TARGET = uninit3
CONFIG += debug console
CONFIG -= qt
QMAKE_CXXFLAGS = -O0
win32-msvc*:QMAKE_CXXFLAGS += -w4700
else:QMAKE_CXXFLAGS = -O0 -Wno-uninitialized
macx:CONFIG -= app_bundle
......
......@@ -3245,12 +3245,12 @@ namespace stdmap {
{
typedef std::pair<uint, float> V;
std::multimap<uint, float> map;
map.insert(V(11, 11.0));
map.insert(V(22, 22.0));
map.insert(V(22, 33.0));
map.insert(V(22, 34.0));
map.insert(V(22, 35.0));
map.insert(V(22, 36.0));
map.insert(V(11, 11.0f));
map.insert(V(22, 22.0f));
map.insert(V(22, 33.0f));
map.insert(V(22, 34.0f));
map.insert(V(22, 35.0f));
map.insert(V(22, 36.0f));
BREAK_HERE;
// Expand map.
// Check map <6 items> std:multimap<unsigned int, float>.
......@@ -7089,9 +7089,9 @@ namespace sanity {
} // namespace sanity
template <class X> int ffff(X x)
template <class X> int ffff(X)
{
return sizeof(x);
return sizeof(X);
}
int main(int argc, char *argv[])
......
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