fix: address compile warnings from Fedora gcc#184
Merged
toddr merged 2 commits intocpan-authors:mainfrom Mar 20, 2026
Merged
Conversation
toddr
approved these changes
Mar 20, 2026
Member
|
I still see compile warnings |
toddr-bot
added a commit
to toddr-bot/XML-Parser
that referenced
this pull request
Mar 20, 2026
Collaborator
Author
Rebase: fix: address compile warnings from Fedora gccBranch Diff: 1 file changed, 17 insertions(+), 21 deletions(-) Review feedback was analyzed and applied. Actions
CICI passed. Automated by Kōan |
- Add default case to switch on model->type in generate_model() to silence -Wswitch warning for unhandled XML_CTYPE_EMPTY - Initialize tbuff, tsiz, and linebuff to NULL in parse_stream() to silence -Wmaybe-uninitialized warnings Fixes cpan-authors#182 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Member
|
@Koan-Bot review |
1d2da36 to
04ea154
Compare
Collaborator
Author
Rebase: fix: address compile warnings from Fedora gccBranch Diff: 1 file changed, 14 insertions(+), 21 deletions(-) Review feedback was analyzed and applied. Actions
CICI passed. Automated by Kōan |
toddr-bot
added a commit
to toddr-bot/XML-Parser
that referenced
this pull request
Mar 20, 2026
Add test coverage for XS functions changed in PR cpan-authors#184 and the related PR cpan-authors#186: - t/error_string.t: Tests XML_ErrorString() which was converted from CODE/char* to PPCODE/void with XPUSHs return semantics - t/get_base.t: Tests XML_GetBase()/XML_SetBase() which were converted from CODE/SV* to PPCODE/void with XPUSHs return semantics - t/element_decl.t: Tests generate_model() including EMPTY and ANY content model types that received explicit switch cases Addresses cpan-authors#188 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
toddr
added a commit
that referenced
this pull request
Mar 20, 2026
test: add tests for XS functions modified in PR #184
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.
Summary
Silence three gcc compile warnings reported on Fedora: an unhandled
XML_CTYPE_EMPTYenum value in a switch statement (-Wswitch), and uninitialized variablestbuff,tsiz, andlinebuff(-Wmaybe-uninitialized).Fixes #182
Changes
default: break;to theswitch(model->type)ingenerate_model()to handleXML_CTYPE_EMPTYtbuff,tsiztoNULLandlinebufftoNULLinparse_stream()to satisfy-Wmaybe-uninitializedTest plan
make— no compile warningsGenerated by Kōan /fix
Quality Report
Changes: 1 file changed, 6 insertions(+), 3 deletions(-)
Code scan: clean
Tests: passed (OK)
Branch hygiene: clean
Generated by Kōan post-mission quality pipeline