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

Fix some compile warnings on Win (VS 2022). #5163

Merged
merged 5 commits into from
Mar 23, 2023
Merged

Commits on Mar 22, 2023

  1. Fix some compile warnings on Win (VS 2022).

    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.
    davidpanderson committed Mar 22, 2023
    Configuration menu
    Copy the full SHA
    6f4b8e5 View commit details
    Browse the repository at this point in the history
  2. Linux: compile fix

    davidpanderson committed Mar 22, 2023
    Configuration menu
    Copy the full SHA
    bd3bf72 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    7874b96 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    b0993f7 View commit details
    Browse the repository at this point in the history

Commits on Mar 23, 2023

  1. Fix a few compile warnings in client simulator.

    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.
    davidpanderson committed Mar 23, 2023
    Configuration menu
    Copy the full SHA
    c29a4da View commit details
    Browse the repository at this point in the history