I know there is /WX
to treat all warnings as errors . And there is /we1234
to treat a specific warning (ie 1234) as an error.
What I miss is a flag to treat all warnings of level 3 as errors but not those of level 4.
In my legacy project we just managed to get rid of all W3 warnings and increased to W4. As this raised a couple thousands warnings, we will not be able to spot any new warnings of W3 when being introduced.
Thus we want to make all W3 warnings errors.
I could compile a list of all W3 warnings and add a /weXYZ
for each of them, but this seems way too tedious.
You have a couple of choices:
Either add a /weXYZ
for each level three warning. Do this as follows:
Alternatively, rather than enabling all level 4 warnings, enable them one at a time (once you have fixed the previous ones).
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.