Reuse paired pragma headers for full numeric range checks - #3653
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 eight matching diagnostic blocks into repeat-includable private headers. Preserve the GCC capability guards, Clang branch, pragma order and all enclosed code. Register both headers for distribution and describe this warning family in the developer guide. Refs: networkupstools#3595 Prepared with OpenAI Codex using gpt-6-astra at 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 a141958 is temporarily available: NUT-tarballs-PR-3653.zip. |
jimklimov
approved these changes
Sep 15, 2026
|
✅ Build nut 2.8.5.5326-master completed (commit 49a9106e31 by @)
|
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.
This moves eight matching numeric-range diagnostic blocks in the client and
HID communication code into a private, repeat-includable header pair, following
the covered-switch pattern from #3599 and the remaining work in #3595.
The five GCC warning guards, push/pop condition, Clang branch and diagnostic
order are preserved. The enclosed checks, casts and control flow are unchanged.
The headers are distributed as private build inputs, and the developer guide
describes where this pair applies. Variants with different warnings remain
local.
Validation on Linux:
-Werror, compilinglibupsclient,usbhid-upswith both libusb APIs, andmge-shut.in GCC/Clang C/C++, and repeated-inclusion and diagnostic-restoration probes.
four compiler/USB configurations.
and whitespace checks.
make distcheck-light, extracted-archive replay, and confirmation that thenew headers are distributed but not installed as public headers.
The default spelling check still reports the unchanged possessives
kernel'sand
firmware'sinNEWS.adocanddocs/man/apcmicrolink.txt, also reproducedat the exact base revision. The test and distribution continuation used
SPELLCHECK_ERROR_FATAL=no; the changed developer document passes the strictcheck. Hardware and other operating systems were not tested.
AI assistance: OpenAI Codex with
gpt-6-astraatxhighreasoning.The human contributor remains responsible for reviewing and validating this change.
Refs: #3595