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

clean clang compile, prototypes C23 issue #301 #324

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

Conversation

webisu
Copy link
Collaborator

@webisu webisu commented Feb 20, 2025

#301 wgrib2 doesn't compile cleanly using clang
tested with AMD clang version 16.0.3 (CLANG: AOCC_4.2.0-Build#89 2023_12_13)
Some old obsolete features are either removed or deprecated from the working draft of C23:
.. K&R function definitions
Wgrib2 had problems and used the old style prototyping for

  1. gctpc which is an old library for geolocation
  2. prototyping to pointers to variadic functions

This fix addresses #309 (gcc 15) but wasn't tested with gcc 15.

I couldn't get prototyping of pointers to variadic functions to work, so
options which were variadic functions were converted to functions
with a constant number of arguments.

@webisu
Copy link
Collaborator Author

webisu commented Feb 23, 2025

jpeg problem: lost line of code in wgrib2.c while editing.
ipolates problem: when mode == -1, some routines used the fact that sec == NULL
rather than check the value of mode. Set sec = NULL for mode = -1, -2.

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.

2 participants