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

PROTON-2772: make wrong printf format strings a MSVC compile error #409

Merged
merged 2 commits into from
Jan 7, 2024

Conversation

jiridanek
Copy link
Contributor

No description provided.

@jiridanek
Copy link
Contributor Author

This PR currently only reveals the issues, it does not try to fix them. There is few tens of warnings generated, for C6328 and C6340 warnings.

https://github.com/jiridanek/qpid-proton/actions/runs/6518361158/job/17703711656#step:12:810

The output of MSVC becomes quite messy when /analyze is enabled. Any suggestions what should be done about it would be most welcome. I could just disable them one by one... and leave them for consideration at some time in the future.

@jiridanek jiridanek marked this pull request as draft January 1, 2024 17:48
@jiridanek
Copy link
Contributor Author

My plan here is to boot up Windows, add all the new warnings on MSVC to the CMakeLists.txt as suppressed, and merge that. I will add comments what these numbers mean. I'll consider putting this into a separate cmake file if the list of suppressions becomes very long.

I imagine this might be hard to maintain if we ever wanted to do warnings-as-errors on msvc, or if msvc then fails when compiling on an older version which does not know some particular warning flag (gcc does this). I will not try to do warnings-as-errors on MSVC to be sure.

@jiridanek
Copy link
Contributor Author

This has been here for a long time with no objections raised. I'm going to squash the commits and merge this first part (annotations and CMakeLists.txt flags).

I'll create a new PR for actually fixing the warnings and I'll leave it here for review next.

@jiridanek jiridanek marked this pull request as ready for review January 7, 2024 18:38
@jiridanek jiridanek merged commit 36c16e7 into apache:main Jan 7, 2024
4 checks passed
@jiridanek jiridanek deleted the jd_2023_10_14_msvc_warn branch January 7, 2024 20:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant