Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to disable warnings in only one project?

I have a legacy project in my solution without comments and many warnings. I want to not see warnings about this specific project but I want to see warnings of the other projects in the same solution.

Is it possible?

edit: I mean "all warnings" of specific project.

like image 897
Vitor Canova Avatar asked Apr 02 '12 21:04

Vitor Canova


People also ask

How do I disable a specific warning in Visual Studio?

Turn off the warning for a project in Visual StudioSelect the Configuration Properties > C/C++ > Advanced property page. Edit the Disable Specific Warnings property to add 4996 . Choose OK to apply your changes.

How do I turn off error warnings?

Description. We currently have only two ways to disable compiler warnings-as-errors: either make none of them errors using --disable-warnings-as-errors or disable all errors with a compiler flag. There is no way to disable specific warnings-as-errors from the SCons command line due to the order of the compiler flags.

How do I ignore warnings in Vscode?

Press Alt+Enter. From the pop-up menu, select Ignore All Warnings in This File.

How do I supress a warning in GCC?

If the value of y is always 1, 2 or 3, then x is always initialized, but GCC doesn't know this. To suppress the warning, you need to provide a default case with assert(0) or similar code. This option also warns when a non-volatile automatic variable might be changed by a call to longjmp.


2 Answers

  1. In Visual Studio open the project's Properties tab
  2. Go to the "Build" tab
  3. Set the "Warning Level" to 0

For details on the different warning levels see:

C# Compiler Options > /warn (Specify Warning Level)

like image 164
Mike Parkhill Avatar answered Sep 21 '22 15:09

Mike Parkhill


Open project properties. Build > Errors and warnings > Warning level

Select 0 warning level. Details you can read here.

like image 42
Sergey Berezovskiy Avatar answered Sep 23 '22 15:09

Sergey Berezovskiy