Fix GCC 15+ build warnings on Ubuntu 26.04#8604
Open
Copilot wants to merge 3 commits into
Open
Conversation
Copilot
AI
changed the title
[WIP] Fix build warnings for Citus on Ubuntu 26.04 with GCC >= 15
Fix GCC 15+ build warnings on Ubuntu 26.04
Jun 1, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8604 +/- ##
==========================================
- Coverage 88.73% 88.73% -0.01%
==========================================
Files 288 288
Lines 64384 64385 +1
Branches 8108 8109 +1
==========================================
- Hits 57133 57130 -3
- Misses 4909 4913 +4
Partials 2342 2342 🚀 New features to boost your workflow:
|
ihalatci
approved these changes
Jun 13, 2026
ihalatci
approved these changes
Jun 14, 2026
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.
GCC ≥ 15 (Ubuntu 26.04) emits warnings building Citus due to stricter const-correctness on
strrchr/bsearchand the new-Wunterminated-string-initializationcheck.Description
Resolves four compiler warnings without behavioral change:
-Wdiscarded-qualifiersonstrrchr(cdc_decoder_utils.c,worker_data_fetch_protocol.c): store the result in aconst char *. The pointer is only read, incremented, and passed tostrtoull/strtou64(first arg isconst char *).-Wdiscarded-qualifiersonbsearch(citus_safe_lib.c): explicitly cast the return tovoid *. Plain cast chosen overunconstify(), whoseStaticAssertfails on older compilers wherebsearchreturns non-constvoid *.-Wunterminated-string-initialization(multi_copy.c): markBinarySignature[11](intentionally non-NUL-terminated, 11 bytes) withpg_attribute_nonstring.pg_version_compat.h): add apg_attribute_nonstringfallback, since the macro only exists in PostgreSQL 18+; guarded by__has_attribute(nonstring)so it degrades to a no-op where unsupported.