Skip to content

fix handling of missing const type qualifier#2146

Merged
mikebrady merged 1 commit intomikebrady:developmentfrom
heitbaum:patch-1
Feb 15, 2026
Merged

fix handling of missing const type qualifier#2146
mikebrady merged 1 commit intomikebrady:developmentfrom
heitbaum:patch-1

Conversation

@heitbaum
Copy link

Pull Requests

Thanks for helping to improve Shairport Sync. This template is an effort to make a Pull Request as trouble-free and useful as possible.

⚠️ Important: Target Branch

Please ensure your pull request targets the development branch, not master.

Contributions should be submitted against the development branch for review and testing before they are merged into the main release branch.


Description

Please provide a brief description of your changes:

For ISO C23, the function strrchr that return pointers into their input arrays now have definitions as macros that return a pointer to a const-qualified type when the input argument is a pointer to a const-qualified type.

Update to const type for variable, as returned string is only used in comparisons which const can be used

Type of Change

Please delete options that are not relevant:

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Code refactoring
  • Performance improvement
  • Build/CI configuration change

Related Issue

If this PR addresses an existing issue, please link it here:

Replaces #2143

Testing

Please describe the tests you ran to verify your changes:

  • Tested on Linux
  • Tested on FreeBSD
  • Tested on OpenBSD
  • Tested with AirPlay 2
  • Tested with classic AirPlay

Test Configuration:

  • Hardware/Platform: Linux
  • OS Version: Ubuntu 24.04
  • Build flags used:

Checklist

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (if applicable)
  • My changes generate no new warnings
  • I have tested my changes and verified they work as expected
  • I have checked that my PR targets the development branch

Additional Notes

Any additional information, context, or screenshots that would help reviewers understand your changes:

For ISO C23, the function strrchr that return pointers into their input arrays now have definitions as macros that return a pointer to a const-qualified type when the input argument is a pointer to a const-qualified type.

Update to const type for variable, as returned string is only used in comparisons which const can be used
@mikebrady mikebrady merged commit d8fc3cd into mikebrady:development Feb 15, 2026
3 checks passed
@mikebrady
Copy link
Owner

Many thanks!

@heitbaum heitbaum deleted the patch-1 branch February 15, 2026 08:14
@mikebrady
Copy link
Owner

Just FYI, had a few follow-on warnings from other parts of the codebase -- nothing huge, but good to fix, thanks.

@heitbaum
Copy link
Author

Just FYI, had a few follow-on warnings from other parts of the codebase -- nothing huge, but good to fix, thanks.

I saw. I believe we don’t compile that code path. Good to see the cleanup.

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