Project

General

Profile

Feature #5643

Consider suppressing some VC++ warnings to have a cleaner build output

Added by Kayra Akman over 5 years ago. Updated over 5 years ago.

Status:
New
Priority:
Normal
Assignee:
Target version:
-
Start date:
04/06/2017
Due date:
% Done:

0%

Estimated time:

Description

Consider the following application:

#include <Wt/WApplication>
#include <Wt/WEnvironment>

using namespace Wt;

WApplication *createApplication(const WEnvironment &env)
{
    return new WApplication(env);
}

int main(int argc, char *argv[])
{
    return WRun(argc, argv, &createApplication);
}

When compiled with Wt 3.3.7 MSVS2013 it produces the attached output. Qt Creator counts 98 warnings. Except a single C4275, all of the warnings are C4251 which is apparently harmless in the context of Wt since Wt applications are working as expected, but such warnings obscure more important warnings. An actual project with tens of source files easily produces thousands of warnings of which C4251 is the majority.

Assuming fixing C4251 is out-of-scope for Wt, IMHO C4251 should be suppressed in a central Wt header file included most, if not all, Wt applications.

When suppressed with a compiler option, other warnings are easily spotted. For example one Wt project of mine generates many C4100 warnings. These are mostly in Dbo headers. Also suppressing or fixing C4100 would make more important warnings stand out.

Although VC warnings led me writing this suggestion, I am sure similar warnings pollute other compilers' outputs as well.


Files

warnings.txt (28 KB) warnings.txt Kayra Akman, 04/06/2017 12:04 PM

Also available in: Atom PDF