Repository navigation
Fix gcc old-style function definition warnings in wcs/ subfolder (#41) - #42
Merged
Merged
Conversation
* Initial plan for fixing old-style function definitions Agent-Logs-Url: https://github.com/astromatic/scamp/sessions/9143e925-0cb8-4ca5-bd32-b35bddf919a0 Co-authored-by: ebertin <4749246+ebertin@users.noreply.github.com> * Fix old-style function definition warnings in src/wcs/ Agent-Logs-Url: https://github.com/astromatic/scamp/sessions/9143e925-0cb8-4ca5-bd32-b35bddf919a0 Co-authored-by: ebertin <4749246+ebertin@users.noreply.github.com> * Fix all remaining warnings in src/wcs/ (array-parameter and unused-variable) Agent-Logs-Url: https://github.com/astromatic/scamp/sessions/be7d1e7f-02a3-4cd2-8bd1-b81fc8f002ea Co-authored-by: ebertin <4749246+ebertin@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: ebertin <4749246+ebertin@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR modernizes legacy K&R (old-style) function definitions in the src/wcs/ WCSLIB-derived code to eliminate GCC warnings and align definitions with existing header prototypes.
Changes:
- Converted old-style (K&R) function definitions to ANSI C prototypes across multiple
src/wcs/*.cfiles. - Adjusted array-parameter forms (e.g.,
vspan[2]→vspan[],eul[5]→eul[]) to match header declarations and avoid-Warray-parameterwarnings. - Removed now-unused local variables in
poly_initortho()to address unused-variable warnings.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/wcs/wcstrig.c | Updates trig helper definitions to ANSI C prototypes. |
| src/wcs/wcs.c | Updates WCS driver/initializer function definitions to ANSI C prototypes and aligns array parameters with headers. |
| src/wcs/sph.c | Updates spherical transform function definitions to ANSI C prototypes and aligns array parameters with headers. |
| src/wcs/proj.c | Updates many projection function definitions to ANSI C prototypes to remove old-style definition warnings. |
| src/wcs/poly.c | Removes unused locals in poly_initortho() to silence unused-variable warnings. |
| src/wcs/lin.c | Updates linear transform and matrix inversion function definitions to ANSI C prototypes. |
| src/wcs/cel.c | Updates celestial transform function definitions to ANSI C prototypes (and matches cel.h pointer-style pcode). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Agent-Logs-Url: https://github.com/astromatic/scamp/sessions/9143e925-0cb8-4ca5-bd32-b35bddf919a0
Agent-Logs-Url: https://github.com/astromatic/scamp/sessions/9143e925-0cb8-4ca5-bd32-b35bddf919a0
Agent-Logs-Url: https://github.com/astromatic/scamp/sessions/be7d1e7f-02a3-4cd2-8bd1-b81fc8f002ea