Skip to content

Fix gcc old-style function definition warnings in wcs/ subfolder (#41) - #42

Merged
ebertin merged 1 commit into
masterfrom
fix_old_style
Apr 12, 2026
Merged

ebertin merged 1 commit into
masterfrom
fix_old_style

Conversation

@ebertin

@ebertin ebertin commented Apr 12, 2026

Copy link
Copy Markdown
Member
  • Initial plan for fixing old-style function definitions

Agent-Logs-Url: https://github.com/astromatic/scamp/sessions/9143e925-0cb8-4ca5-bd32-b35bddf919a0

  • Fix old-style function definition warnings in src/wcs/

Agent-Logs-Url: https://github.com/astromatic/scamp/sessions/9143e925-0cb8-4ca5-bd32-b35bddf919a0

  • 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


* 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>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/*.c files.
  • Adjusted array-parameter forms (e.g., vspan[2] → vspan[], eul[5] → eul[]) to match header declarations and avoid -Warray-parameter warnings.
  • 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.

@ebertin
ebertin merged commit b34dae5 into master Apr 12, 2026
6 checks passed
@ebertin
ebertin deleted the fix_old_style branch April 12, 2026 17:38
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.

3 participants