Skip to content

Conversation

@jamescowens
Copy link
Member

@jamescowens jamescowens commented Jun 30, 2025

This wraps the functors in env_config.c with pointer casts to allow compilation in the stricter gcc15+. Note there is a lot of remaining technical debt in bdb53, including old K&R style function definitions that are throwing warnings and will eventually be a problem. For right now, this will suffice, and should fix the problems with Arch and other distributions that are using the gcc15 compiler.

This wraps the functors in env_config.c with pointer casts to
allow compilation in the stricter gcc15+. Note there is a lot
of remaining technical debt in bdb53, including old K&R style
function definitions that are throwing warnings and will eventually
be a problem. For right now, this will suffice.
Copy link

Copilot AI left a comment

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 updates the env_config.c functor entries to compile under GCC 15+ by wrapping each function pointer in an int (*)(void) cast.

  • Added explicit (int (*)(void)) casts around existing configuration functions to satisfy stricter pointer-type checks in GCC 15+.
  • No changes to underlying logic; purely a compilation workaround.
  • Leaves existing K&R-style definitions and other technical debt for future cleanup.
Comments suppressed due to low confidence (1)

src/bdb53/src/env/env_config.c:93

  • [nitpick] This entry’s spacing is inconsistent with others (missing space after comma). Align commas and indentation to match the surrounding entries for readability.
    { "set_intermediate_dir_mode",CFG_STRING, (int (*)(void))__env_set_intermediate_dir_mode },

Copy link
Member

@div72 div72 left a comment

Choose a reason for hiding this comment

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

utACK

@jamescowens jamescowens merged commit 9cfde81 into gridcoin-community:development Jul 2, 2025
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants