Extract shared unreachable-code diagnostic pragmas - #3650
Open
user01010111 wants to merge 1 commit into
Open
user01010111 wants to merge 1 commit into
user01010111 wants to merge 1 commit into
Conversation
Move 17 identical GCC/Clang pragma pairs into private repeat-includable headers. Preserve the aggregate capability guard, diagnostic order and original boundaries; distribute the headers and document their use. Refs: networkupstools#3595 AI assistance: OpenAI Codex gpt-6-astra (xhigh reasoning). Signed-off-by: user01010111 <lapses.50.booster@icloud.com>
|
A ZIP file with standard source tarball and another tarball with pre-built docs for commit 1cc20a5 is temporarily available: NUT-tarballs-PR-3650.zip. |
jimklimov
approved these changes
Sep 15, 2026
|
✅ Build nut 2.8.5.5323-master completed (commit c5cae3b0be by @)
|
jimklimov
added a commit
to com6056/nut
that referenced
this pull request
Sep 17, 2026
…code" for strcmp(SONAME_LIBX, SOFILE_LIBX) [networkupstools#3654] Newer builders (notably those with clang-21 and clang-22) on some agents correctly identify that we compare identical (macro) strings and the clause would never run. Ideally the comparison would be pre-processor equality check for strings, but as that is missing (or not portable), we compare to avoid work in vain at run-time - and now quiesce the compiler warnings about that on systems that do benefit from this check. To be revised after PR networkupstools#3650 is merged, to simplify these pragma blocks. Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
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.
Replace 17 repeated GCC/Clang unreachable-code pragma pairs in 16 internal source files with two private headers that can be included repeatedly. The original capability guards, diagnostic order and enclosed code are preserved. The headers are distributed with the source, and the developer guide describes their use.
Refs: #3595
This continues the pragma extraction work. Mixed-warning regions, variants with different push/pop guards and public headers remain local.
Validation:
make distcheck-lightcompleted archive rebuild, tests, install/uninstall and cleanup. The extracted archive passed the same source/header proof, and the new headers were not installed.Full strict spelling checks still report the same possessives in unchanged NEWS.adoc and apcmicrolink documentation as the exact base. Test and distribution continuations used
SPELLCHECK_ERROR_FATAL=no, preserving those reports. The standard distcheck-light preparation supplied placeholders for 74 missing unrelated manual pages; the changed developer guide was rendered independently. No hardware or deployed-service testing is claimed.AI assistance: OpenAI Codex, model
gpt-6-astra, reasoning levelxhigh. The human contributor remains responsible for reviewing and validating the change.