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

Quiet compiler warnings for registry.exe #1858

Open
wants to merge 19 commits into
base: develop
Choose a base branch
from

Commits on Feb 8, 2024

  1. STY: First pass at eliminating compiler warnings.

    There might be more I wanted to add, but I don't remember.
    I'll have to add those the way I did the first time,
    compiling with -Werror until it works.
    This pass is almost exclusively focused on the registry.
    I'll have a few more for Fortran once I figure out how.
    
    Inspiration: registry was segfaulting, so I tried fixing the warnings
    in case it was one of those.  It didn't work, but it's worth doing
    regardless.
    DWesl committed Feb 8, 2024
    Configuration menu
    Copy the full SHA
    0ab3bb9 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    9e252e5 View commit details
    Browse the repository at this point in the history
  3. BLD,BUG: Don't add warning flags to default compilation

    Change compile flags back to what they were before.
    DWesl committed Feb 8, 2024
    Configuration menu
    Copy the full SHA
    334a1a2 View commit details
    Browse the repository at this point in the history
  4. BUG: io.h only available on Windows/Cygwin

    Guard io.h #include to avoid Linux compilation failures.
    DWesl committed Feb 8, 2024
    Configuration menu
    Copy the full SHA
    afd1c1a View commit details
    Browse the repository at this point in the history
  5. STY: Add sufficient space to more destination buffers.

    Given how much space this provides at the moment, this had better not
    run over.
    DWesl committed Feb 8, 2024
    Configuration menu
    Copy the full SHA
    173864f View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    ba2eb1c View commit details
    Browse the repository at this point in the history
  7. STY: Delete the partial posix_spawn calls.

    Most likely the better solution is to look up functions
    to copy or delete files directly.
    I'm not sure where to look for those,
    but I'm pretty sure they're not in the C standard.
    DWesl committed Feb 8, 2024
    Configuration menu
    Copy the full SHA
    22c4ba0 View commit details
    Browse the repository at this point in the history
  8. STY: Remove the partial memory leak fix.

    I pushed it to another branch, so a PR version can get some eyes on it.
    DWesl committed Feb 8, 2024
    Configuration menu
    Copy the full SHA
    1208434 View commit details
    Browse the repository at this point in the history
  9. BUG: Declare gen_packs and gen_packs_halo return types as int

    external/RSL_LITE implements these as int, so they need to be declared with int returns, not void.
    DWesl committed Feb 8, 2024
    Configuration menu
    Copy the full SHA
    317d219 View commit details
    Browse the repository at this point in the history
  10. STY: Replace more integer literals with named constants.

    Not quite all of them yet, but there's only one other, that one
    without an existing named constant.
    
    EDIT: There's about seventy left: I'll have to go through those again.
    DWesl committed Feb 8, 2024
    Configuration menu
    Copy the full SHA
    8bdb29d View commit details
    Browse the repository at this point in the history
  11. STY: Use TABLE_ENTRY for the max length of the KPP names

    I think there's a way to pass this as a parameter to snprintf instead, but I don't remember what that is at the moment.
    DWesl committed Feb 8, 2024
    Configuration menu
    Copy the full SHA
    d51f4ca View commit details
    Browse the repository at this point in the history
  12. STY: Pass number of characters in KPP name as printf argument

    I looked up how to do this.  Apparently you just stick a star for the width and put the variable with the width before the variable you want to have that width.
    DWesl committed Feb 8, 2024
    Configuration menu
    Copy the full SHA
    c116e16 View commit details
    Browse the repository at this point in the history
  13. STY: Two more file-path variables using NAMELEN.

    grep -E -e '\[[[:digit:]]{2,}\]' *.[CcHhFf]*
    DWesl committed Feb 8, 2024
    Configuration menu
    Copy the full SHA
    4ba1aab View commit details
    Browse the repository at this point in the history
  14. STY: combine fprintf calls, replace sprintf with strcpy.

    Lots of unused variables, but I should be able to leave those for a bit.
    Unused parameters would be a pain, so I'm leaving those.
    DWesl committed Feb 8, 2024
    Configuration menu
    Copy the full SHA
    764c90d View commit details
    Browse the repository at this point in the history

Commits on Feb 19, 2024

  1. STY: Keep nChmOpts an int

    I wanted to make it a short to save space in the strings based on this, but given the push to optimize for clarity that's less relevant.
    DWesl authored Feb 19, 2024
    Configuration menu
    Copy the full SHA
    894373e View commit details
    Browse the repository at this point in the history

Commits on Feb 29, 2024

  1. Merge remote-tracking branch 'wrf-model/develop' into quiet-compiler-…

    …warnings-registry
    
    Fix merge conflicts.
    DWesl committed Feb 29, 2024
    Configuration menu
    Copy the full SHA
    75742b9 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    77fbd16 View commit details
    Browse the repository at this point in the history
  3. STY: Revert narrowing of nChmOpts.

    I made nChmOpts a short int to keep buffer size down.
    Given the change to named constants, this is likely irrelevant.
    
    On the other hand, it may currently max out at five.
    DWesl committed Feb 29, 2024
    Configuration menu
    Copy the full SHA
    6dc8eb0 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    6c12eee View commit details
    Browse the repository at this point in the history