fix(python_plugins_loader): suppress -Wconversion for SWIG-generated code#2673
Merged
kontura merged 1 commit intorpm-software-management:mainfrom Apr 5, 2026
Merged
Conversation
…code The SWIG-generated swigpyrun.h contains an implicit size_t to int narrowing in SWIG_Hash(): rem -= sizeof(unsigned int); This triggers -Werror=conversion with GCC 16 (not Clang). The bug is fixed in SWIG master (swig/swig#3287), but unfortunately, not in any released SWIG version at the time of writing (see swig/swig@296fe5e, 4.4.1 narrowly missed it). This warning was previously masked by a leaked -Wconversion diagnostic suppression in fmt < 12 (fmtlib/fmt#4588). fmt 12 properly scoped the suppression, exposing this pre-existing SWIG issue. Add -Wno-conversion to the existing warning suppression list for the python_plugins_loader target, consistent with the existing approach of suppressing warnings in SWIG-generated code that we don't control. We can revert this change once the downstream packaging picks up the SWIG fix. Signed-off-by: Kefu Chai <[email protected]>
Contributor
Author
|
FWIW, a bz was filed at https://bugzilla.redhat.com/show_bug.cgi?id=2454313 |
Merged
via the queue into
rpm-software-management:main
with commit Apr 5, 2026
5122f83
19 checks passed
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.
The SWIG-generated swigpyrun.h contains an implicit size_t to int narrowing in SWIG_Hash():
This triggers -Werror=conversion with GCC 16 (not Clang). The bug is fixed in SWIG master (swig/swig#3287), but unfortunately, not in any released SWIG version at the time of writing (see
swig/swig@296fe5e, 4.4.1 narrowly missed it).
This warning was previously masked by a leaked -Wconversion diagnostic suppression in fmt < 12 (fmtlib/fmt#4588). fmt 12 properly scoped the suppression, exposing this pre-existing SWIG issue.
Add -Wno-conversion to the existing warning suppression list for the python_plugins_loader target, consistent with the existing approach of suppressing warnings in SWIG-generated code that we don't control.
We can revert this change once the downstream packaging picks up the SWIG fix.