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 -wd4511 \ # copy constructor could not be generated
-wd4512 \ # assignment operator could not be generated -wd4512 \ # assignment operator could not be generated
-wd4513 \ # destructor 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 -wd4610 \ # can never be instantiated user defined constructor required
-wd4623 \ # default constructor could not be generated -wd4623 \ # default constructor could not be generated
-wd4624 \ # destructor could not be generated -wd4624 \ # destructor could not be generated
@ -708,8 +709,15 @@ MSVC_DEBUG_CXXFLAGS += \
-wd4711 \ # call was inlined -wd4711 \ # call was inlined
-wd4820 \ # some padding was added -wd4820 \ # some padding was added
-wd4917 \ # a GUID can only be associated with a class, interface or namespace -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 # 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. # standard library headers, so it's impractical to leave them on.
-wd4619 \ # there is no warning number 'XXXX' -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. QMAKE_CXXFLAGS += $$MSVC_DEBUG_CXXFLAGS # See common.pri for more details.
checkWarnings{ # For enable run qmake with CONFIG+=checkWarnings 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. QMAKE_CXXFLAGS += $$MSVC_DEBUG_CXXFLAGS # See common.pri for more details.
checkWarnings{ # For enable run qmake with CONFIG+=checkWarnings 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. QMAKE_CXXFLAGS += $$MSVC_DEBUG_CXXFLAGS # See common.pri for more details.
checkWarnings{ # For enable run qmake with CONFIG+=checkWarnings 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. QMAKE_CXXFLAGS += $$MSVC_DEBUG_CXXFLAGS # See common.pri for more details.
checkWarnings{ # For enable run qmake with CONFIG+=checkWarnings 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: case cmFUNC:
{ {
int iArgCount = pTok->Fun.argc; int iArgCount = pTok->Fun.argc;
#ifdef Q_CC_CLANG
#pragma clang diagnostic push QT_WARNING_PUSH
#pragma clang diagnostic ignored "-Wundefined-reinterpret-cast" QT_WARNING_DISABLE_CLANG("-Wundefined-reinterpret-cast")
#endif QT_WARNING_DISABLE_MSVC(4191)
// switch according to argument count // switch according to argument count
switch (iArgCount) switch (iArgCount)
@ -1293,9 +1293,7 @@ qreal QmuParserBase::ParseCmdCodeBulk(int nOffset, int nThreadID) const
return 0; return 0;
} // switch CmdCode } // switch CmdCode
#ifdef Q_CC_CLANG QT_WARNING_POP
#pragma clang diagnostic pop
#endif
} // for all bytecode tokens } // for all bytecode tokens

View File

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

View File

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

View File

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

View File

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