Skip to content

Fix const assignment warnings#188

Merged
adamdickmeiss merged 8 commits into
masterfrom
fix-const-assignment-warnings
May 28, 2026
Merged

Fix const assignment warnings#188
adamdickmeiss merged 8 commits into
masterfrom
fix-const-assignment-warnings

Conversation

@adamdickmeiss
Copy link
Copy Markdown
Contributor

No description provided.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR aims to eliminate compiler warnings about assigning/modifying const data by tightening pointer constness and avoiding in-place string edits across a few parsing/caching paths.

Changes:

  • Reordered includes to keep config.h first in a test file.
  • Switched a MARC SAX test away from xmlSAXUserParseMemory to a push-parser context to avoid const-related warnings.
  • Reworked several string-splitting paths (SOLR scan term splitting, diagnostic URI parsing, MARC line subfield handling) to avoid modifying source buffers.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
test/test_tpath.c Moves includes below config.h to match typical include ordering.
test/test_marc_read_sax.c Replaces in-memory SAX parsing with a libxml2 push parser context.
src/zoom-record-cache.c Refactors diagnostic URI parsing to avoid in-place edits (but currently introduces a crash/logic bug).
src/solr.c Avoids mutating facet term strings by using length-bounded duplication.
src/retrieval.c Updates temporary pointers to const char * where appropriate.
src/marc_read_line.c Attempts to avoid const warnings while removing a blank after subfield markers (but currently corrupts output).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/zoom-record-cache.c Outdated
Comment thread src/marc_read_line.c Outdated
@adamdickmeiss adamdickmeiss merged commit 52b4de1 into master May 28, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants