Nantes Université

Skip to content
Extraits de code Groupes Projets
Non vérifiée Valider 555d2d42 rédigé par Sumit Bhardwaj's avatar Sumit Bhardwaj Validation de GitHub
Parcourir les fichiers

Enable warnings as error and W4 on MSVC (#83)

This commit increase warning level from `W3` to `W4` on MSVC and sets
warnings as errors. Exclusion is made for a specific warning (C4189).
parent 5227291b
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -47,7 +47,8 @@ if (MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP")
target_compile_options(${PICT_BUILD_OPTIONS}
INTERFACE
/W3
/W4 /WX
/wd4189 # DOUT(arg) has unused parameters. Suppressing the warning here.
)
target_compile_definitions(${PICT_BUILD_OPTIONS}
......
......@@ -34,7 +34,6 @@ void __cdecl wmain()
PICT_RET_CODE ret = PICT_SUCCESS;
PICT_HANDLE task = PictCreateTask();
checkNull( task );
//
// In a general case, models might form a tree-like hierarchy
......@@ -42,6 +41,7 @@ void __cdecl wmain()
//
PICT_HANDLE model = PictCreateModel();
checkNull( task );
checkNull( model );
//
......
......@@ -270,7 +270,7 @@ public:
}
// for inserter() to work we need two-param insert
iterator insert( iterator pos, const ExclusionTerm& Term )
iterator insert( iterator, const ExclusionTerm& Term )
{
return insert( Term ).first;
}
......
......@@ -532,9 +532,6 @@ RelationType ConstraintsTokenizer::getRelationType()
else throw CSyntaxError( SyntaxErrorType::UnknownRelation, _currentPosition );
}
else throw CSyntaxError( SyntaxErrorType::UnknownRelation, _currentPosition );
assert( false );
return ( RelationType::Unknown );
}
//
......
......@@ -162,7 +162,8 @@ ErrorCode CGcdData::TranslateToGCD()
{
CModelParameter& param = _modelData.Parameters[ index ];
Parameter* gcdParam = new Parameter( UNDEFINED_ORDER, index, static_cast<int>( param.Values.size() ),
Parameter* gcdParam = new Parameter( UNDEFINED_ORDER, static_cast<int>(index),
static_cast<int>( param.Values.size() ),
param.Name, param.IsResultParameter );
// find out and assign weights to values
......
......@@ -61,7 +61,7 @@ public:
CModelParameter() :
Name(L""),
IsResultParameter(false),
Order(UNDEFINED_ORDER),
Order(static_cast<unsigned int>(UNDEFINED_ORDER)),
GcdPointer(nullptr){}
int GetValueOrdinal( IN std::wstring& name, IN bool caseSensitive );
......
......@@ -134,7 +134,7 @@ bool CModelData::readParameter( wstring& line )
wstring name = trim( line.substr( 0, paramSep ));
unsigned int order = UNDEFINED_ORDER;
unsigned int order = static_cast<unsigned int>(UNDEFINED_ORDER);
//check if this param has custom-order defined
wstrings nameAndOrder;
......
#if defined(_WIN32)
#include "windows.h"
BOOL APIENTRY DllMain( HMODULE hModule,
BOOL APIENTRY DllMain( HMODULE /*hModule*/,
DWORD ul_reason_for_call,
LPVOID lpReserved
LPVOID /*lpReserved*/
)
{
switch (ul_reason_for_call)
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter