-
Notifications
You must be signed in to change notification settings - Fork 446
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
Fix some compile warnings on Win (VS 2022). #5163
Conversation
Remove outdated stuff (e.g. VS has snprintf() now). I'd like to have a clean build (no warnings) on both VS and gcc. Currently VS has a bunch of printf code warnings in diagnostics.cpp, diagnostics_win.cpp, and stackwalker_win.cpp. These should be easy to fix. gcc has a bunch of sprintf buffer-size warnings, not easy to fix. There are lots of warnings in zip (to be fixed with vcpkg?) and in old graphics code.
Yep. I want to remove this old 3rdparty libraries from our repo and install them as a dependencies. @davidpanderson, could you please fix build errors meanwhile? |
Currently manager build on linux vcpkg ix expected to fail. I'm working on a fix. |
Also lots of |
Use snprintf() instead of sprintf() in a few places (should eventually do it everywhere) Notes: (void)x; seems to work (cross-platform) for suppressing unused arg warnings. int n; n = snprintf(buf, sizeof(buf), ....) (void)n; works in some cases for suppressing buffer-size warnings. But not all cases. Not sure why.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #5163 +/- ##
=========================================
Coverage 10.85% 10.85%
Complexity 1064 1064
=========================================
Files 279 279
Lines 35992 35992
Branches 8258 8258
=========================================
Hits 3907 3907
Misses 31693 31693
Partials 392 392
|
I think I'm done with this PR. |
I'll review it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Thank you for this PR
Remove outdated stuff (e.g. VS has snprintf() now).
I'd like to have a clean build (no warnings) on both VS and gcc. Currently VS has a bunch of printf code warnings in diagnostics.cpp, diagnostics_win.cpp, and stackwalker_win.cpp. These should be easy to fix.
gcc has a bunch of sprintf buffer-size warnings, not easy to fix. There are lots of warnings in zip (to be fixed with vcpkg?) and in old graphics code.