forked from qt-creator/qt-creator
Tests: Fix MSVC warnings
Change-Id: If7f67ffc68ef725554e9ebaf8a8db5a64b7309cb Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com> Reviewed-by: hjk <hjk@theqtcompany.com>
This commit is contained in:
@@ -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);
|
||||
|
@@ -1,7 +1,6 @@
|
||||
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[])
|
||||
|
Reference in New Issue
Block a user