MSVC warnings.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2016-08-06 15:59:30 +03:00
parent e7b72c4a44
commit 69e0ff74e6
21 changed files with 42 additions and 47 deletions

View File

@ -692,6 +692,7 @@ MSVC_DEBUG_CXXFLAGS += \
-wd4511 \ # copy constructor could not be generated
-wd4512 \ # assignment operator could not be generated
-wd4513 \ # destructor could not be generated
-wd4514 \ # 'function' : unreferenced inline function has been removed
-wd4610 \ # can never be instantiated user defined constructor required
-wd4623 \ # default constructor could not be generated
-wd4624 \ # destructor could not be generated
@ -708,8 +709,15 @@ MSVC_DEBUG_CXXFLAGS += \
-wd4711 \ # call was inlined
-wd4820 \ # some padding was added
-wd4917 \ # a GUID can only be associated with a class, interface or namespace
-wd4351 \ # elements of array 'array' will be default initialized
# The following are real warnings but are generated by almost all MS headers, including
# standard library headers, so it's impractical to leave them on.
-wd4619 \ # there is no warning number 'XXXX'
-wd4668 # XXX is not defined as a preprocessor macro
-wd4668 \ # XXX is not defined as a preprocessor macro
# Because Microsoft doesn't provide a way to suppress warnings in headers we will suppress
# all warnings we meet in headers globally
-wd4548 \
-wd4350 \
-wd4242 \
-wd4265
}

View File

@ -66,7 +66,7 @@ unix {
QMAKE_CXXFLAGS += $$MSVC_DEBUG_CXXFLAGS # See common.pri for more details.
checkWarnings{ # For enable run qmake with CONFIG+=checkWarnings
#QMAKE_CXXFLAGS += -WX
QMAKE_CXXFLAGS += -WX
}
}
}

View File

@ -69,7 +69,7 @@ unix {
QMAKE_CXXFLAGS += $$MSVC_DEBUG_CXXFLAGS # See common.pri for more details.
checkWarnings{ # For enable run qmake with CONFIG+=checkWarnings
#QMAKE_CXXFLAGS += -WX
QMAKE_CXXFLAGS += -WX
}
}
}

View File

@ -57,7 +57,7 @@ unix {
QMAKE_CXXFLAGS += $$MSVC_DEBUG_CXXFLAGS # See common.pri for more details.
checkWarnings{ # For enable run qmake with CONFIG+=checkWarnings
#QMAKE_CXXFLAGS += -WX
QMAKE_CXXFLAGS += -WX
}
}
}

View File

@ -63,7 +63,7 @@ unix {
QMAKE_CXXFLAGS += $$MSVC_DEBUG_CXXFLAGS # See common.pri for more details.
checkWarnings{ # For enable run qmake with CONFIG+=checkWarnings
#QMAKE_CXXFLAGS += -WX
QMAKE_CXXFLAGS += -WX
}
}
}

View File

@ -1097,10 +1097,10 @@ qreal QmuParserBase::ParseCmdCodeBulk(int nOffset, int nThreadID) const
case cmFUNC:
{
int iArgCount = pTok->Fun.argc;
#ifdef Q_CC_CLANG
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wundefined-reinterpret-cast"
#endif
QT_WARNING_PUSH
QT_WARNING_DISABLE_CLANG("-Wundefined-reinterpret-cast")
QT_WARNING_DISABLE_MSVC(4191)
// switch according to argument count
switch (iArgCount)
@ -1293,9 +1293,7 @@ qreal QmuParserBase::ParseCmdCodeBulk(int nOffset, int nThreadID) const
return 0;
} // switch CmdCode
#ifdef Q_CC_CLANG
#pragma clang diagnostic pop
#endif
QT_WARNING_POP
} // for all bytecode tokens

View File

@ -204,10 +204,9 @@ void QmuParserByteCode::ConstantFolding(ECmdCode a_Oprt)
} // switch opcode
}
#if defined (Q_CC_INTEL)
#pragma warning( push )
#pragma warning( disable: 1195 )
#endif
QT_WARNING_PUSH
QT_WARNING_DISABLE_INTEL(1195)
QT_WARNING_DISABLE_MSVC(4826)
//---------------------------------------------------------------------------------------------------------------------
/**
@ -369,9 +368,7 @@ void QmuParserByteCode::AddOp(ECmdCode a_Oprt)
}
}
#if defined(Q_CC_INTEL)
#pragma warning( pop )
#endif
QT_WARNING_POP
//---------------------------------------------------------------------------------------------------------------------
void QmuParserByteCode::AddIfElse(ECmdCode a_Oprt)

View File

@ -54,7 +54,7 @@ unix {
QMAKE_CXXFLAGS += $$MSVC_DEBUG_CXXFLAGS # See common.pri for more details.
checkWarnings{ # For enable run qmake with CONFIG+=checkWarnings
#QMAKE_CXXFLAGS += -WX
QMAKE_CXXFLAGS += -WX
}
}
}

View File

@ -54,7 +54,7 @@ unix {
QMAKE_CXXFLAGS += $$MSVC_DEBUG_CXXFLAGS # See common.pri for more details.
checkWarnings{ # For enable run qmake with CONFIG+=checkWarnings
#QMAKE_CXXFLAGS += -WX
QMAKE_CXXFLAGS += -WX
}
}
}

View File

@ -54,7 +54,7 @@ unix {
QMAKE_CXXFLAGS += $$MSVC_DEBUG_CXXFLAGS # See common.pri for more details.
checkWarnings{ # For enable run qmake with CONFIG+=checkWarnings
#QMAKE_CXXFLAGS += -WX
QMAKE_CXXFLAGS += -WX
}
}
}

View File

@ -54,7 +54,7 @@ unix {
QMAKE_CXXFLAGS += $$MSVC_DEBUG_CXXFLAGS # See common.pri for more details.
checkWarnings{ # For enable run qmake with CONFIG+=checkWarnings
#QMAKE_CXXFLAGS += -WX
QMAKE_CXXFLAGS += -WX
}
}
}

View File

@ -68,7 +68,7 @@ unix {
QMAKE_CXXFLAGS += $$MSVC_DEBUG_CXXFLAGS # See common.pri for more details.
checkWarnings{ # For enable run qmake with CONFIG+=checkWarnings
#QMAKE_CXXFLAGS += -WX
QMAKE_CXXFLAGS += -WX
}
}
}

View File

@ -59,7 +59,7 @@ unix {
QMAKE_CXXFLAGS += $$MSVC_DEBUG_CXXFLAGS # See common.pri for more details.
checkWarnings{ # For enable run qmake with CONFIG+=checkWarnings
#QMAKE_CXXFLAGS += -WX
QMAKE_CXXFLAGS += -WX
}
}
}

View File

@ -110,11 +110,11 @@
#include <math.h>
#include <QtGlobal>
#ifdef Q_CC_GNU
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wold-style-cast"
#pragma GCC diagnostic ignored "-Wfloat-equal"
#endif
QT_WARNING_PUSH
QT_WARNING_DISABLE_MSVC(4701)
QT_WARNING_DISABLE_GCC("-Wold-style-cast")
QT_WARNING_DISABLE_GCC("-Wfloat-equal")
QT_WARNING_DISABLE_GCC("-Wmaybe-uninitialized")
/* On some machines, the exact arithmetic routines might be defeated by the */
/* use of internal extended precision floating-point registers. Sometimes */
@ -498,10 +498,6 @@ qreal estimate(int elen, qreal *e)
return Q;
}
#if defined(Q_CC_GNU)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
#endif
qreal incircleadapt(qreal *pa, qreal *pb, qreal *pc, qreal *pd, qreal permanent)
{
INEXACT qreal adx, bdx, cdx, ady, bdy, cdy;
@ -1035,9 +1031,7 @@ qreal incircleadapt(qreal *pa, qreal *pb, qreal *pc, qreal *pd, qreal permanent)
return finnow[finlength - 1];
}
#if defined(Q_CC_GNU)
#pragma GCC diagnostic pop
#endif
qreal incircle(qreal *pa, qreal *pb, qreal *pc, qreal *pd)
{
@ -1082,6 +1076,4 @@ qreal incircle(qreal *pa, qreal *pb, qreal *pc, qreal *pd)
return incircleadapt(pa, pb, pc, pd, permanent);
}
#ifdef Q_CC_GNU
#pragma GCC diagnostic pop
#endif
QT_WARNING_POP

View File

@ -54,7 +54,7 @@ unix {
QMAKE_CXXFLAGS += $$MSVC_DEBUG_CXXFLAGS # See common.pri for more details.
checkWarnings{ # For enable run qmake with CONFIG+=checkWarnings
#QMAKE_CXXFLAGS += -WX
QMAKE_CXXFLAGS += -WX
}
}
}

View File

@ -54,7 +54,7 @@ unix {
QMAKE_CXXFLAGS += $$MSVC_DEBUG_CXXFLAGS # See common.pri for more details.
checkWarnings{ # For enable run qmake with CONFIG+=checkWarnings
#QMAKE_CXXFLAGS += -WX
QMAKE_CXXFLAGS += -WX
}
}
}

View File

@ -64,7 +64,7 @@ unix {
QMAKE_CXXFLAGS += $$MSVC_DEBUG_CXXFLAGS # See common.pri for more details.
checkWarnings{ # For enable run qmake with CONFIG+=checkWarnings
#QMAKE_CXXFLAGS += -WX
QMAKE_CXXFLAGS += -WX
}
}
}

View File

@ -62,7 +62,7 @@ unix {
QMAKE_CXXFLAGS += $$MSVC_DEBUG_CXXFLAGS # See common.pri for more details.
checkWarnings{ # For enable run qmake with CONFIG+=checkWarnings
#QMAKE_CXXFLAGS += -WX
QMAKE_CXXFLAGS += -WX
}
}
}

View File

@ -59,7 +59,7 @@ unix {
QMAKE_CXXFLAGS += $$MSVC_DEBUG_CXXFLAGS # See common.pri for more details.
checkWarnings{ # For enable run qmake with CONFIG+=checkWarnings
#QMAKE_CXXFLAGS += -WX
QMAKE_CXXFLAGS += -WX
}
}
}

View File

@ -54,7 +54,7 @@ unix {
QMAKE_CXXFLAGS += $$MSVC_DEBUG_CXXFLAGS # See common.pri for more details.
checkWarnings{ # For enable run qmake with CONFIG+=checkWarnings
#QMAKE_CXXFLAGS += -WX
QMAKE_CXXFLAGS += -WX
}
}
}

View File

@ -61,7 +61,7 @@ unix {
QMAKE_CXXFLAGS += $$MSVC_DEBUG_CXXFLAGS # See common.pri for more details.
checkWarnings{ # For enable run qmake with CONFIG+=checkWarnings
#QMAKE_CXXFLAGS += -WX
QMAKE_CXXFLAGS += -WX
}
}
}