Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Report all warnings in CI builds #4877

Open
jhlegarreta opened this issue Oct 10, 2024 · 5 comments
Open

Report all warnings in CI builds #4877

jhlegarreta opened this issue Oct 10, 2024 · 5 comments
Labels
type:Bug Inconsistencies or issues which will cause an incorrect result under some or all circumstances

Comments

@jhlegarreta
Copy link
Member

Description

Compiling ITK on MSVC with the /Wall flag raises a number of warnings that are not being reported in our CI builds. We should at least report or monitor them to try to address them as time permits.

Steps to Reproduce

Add the relevant warnings (e.g. /Wall) to the compilers to report all warnings.

Expected behavior

We monitor all source code warnings.

Actual behavior

Not all source code warnings are being monitored.

Reproducibility

N/A.

Versions

master.

Environment

Any.

Additional Information

Cross-referencing #4865 (comment).

@jhlegarreta jhlegarreta added the type:Bug Inconsistencies or issues which will cause an incorrect result under some or all circumstances label Oct 10, 2024
@jhlegarreta
Copy link
Member Author

Cross-ref #4865 (comment):

I tried it locally, only to see no new warnings.

Here is the screenshot of my compiler's output:

itk_Wall_warnings

I will try to post my CMakeCache.txt to see if that helps explaining the difference.

Here it is: CMakeCache.txt

@N-Dekker
Copy link
Contributor

I do like to see all those warnings, thanks 👍 However, I don't think it's necessary to fix all of them. MSVC /Wall produces a lot of noise. Most of those /Wall warnings do not indicate a serious problem in the code.

MSVC /Wall enables compiler warnings that are off by default. Its description says:

The compiler supports warnings that are turned off by default, because most developers don't find them useful.

@jhlegarreta
Copy link
Member Author

MSVC /Wall produces a lot of noise. Most of those /Wall warnings do not indicate a serious problem in the code.

Probably, but the example in #4865 speaks for itself. And I also saw some warnings related to unused variables and signedness comparison mismatches.

@N-Dekker
Copy link
Contributor

the example in #4865 speaks for itself

If you really want to address all those /Wall warnings, can you please do it in small steps, one warning category per PR? (Rather than having one "mega PR" for all warnings.) I find it difficult to review large PRs. And warnings can often be addressed in multiple ways, which may need to be discussed before merging.

@jhlegarreta
Copy link
Member Author

If you really want to address all those /Wall warnings, can you please do it in small steps, one warning category per PR?

Niels, please, I did not say that I will attempt at fixing all warnings, but I believe that unless we see such warnings openly somewhere it is impossible to assess what we are ignoring. I have a list of other things that I have been unable to address in ITK since some time now. Also, I know very well the time it would require to have a look at the 5000+ warnings that I get from /Wall... You have seen my PRs in the past and I believe both PRs and commits have been clean enough, and commit messages good enough to give the necessary context to reviewers, and addressing one problem at a time. Thanks for understanding.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:Bug Inconsistencies or issues which will cause an incorrect result under some or all circumstances
Projects
None yet
Development

No branches or pull requests

2 participants