Skip to content

fix(util): tighten const usage and pthread format#454

Merged
netniV merged 2 commits intoCacti:developfrom
somethingwithproof:fix/warnings-followup-pr
Mar 12, 2026
Merged

fix(util): tighten const usage and pthread format#454
netniV merged 2 commits intoCacti:developfrom
somethingwithproof:fix/warnings-followup-pr

Conversation

@somethingwithproof
Copy link
Copy Markdown
Contributor

@somethingwithproof somethingwithproof commented Mar 12, 2026

Follow-up PR for warning cleanup outside #452 scope.\n\nChanges:\n- make read_spine_config take a const file path in util.h and util.c\n- fix pthread_self log format specifier to match cast type (%lu)\n\nValidation:\n- change is minimal and isolated\n- local configure/build could not complete in this environment due missing MySQL headers

Linked issue

Fixes #464

Copilot AI review requested due to automatic review settings March 12, 2026 05:55
Copy link
Copy Markdown
Contributor

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 follows up on warning cleanup by tightening read_spine_config’s API to accept an immutable file path and correcting a thread-id log format specifier to match the cast type.

Changes:

  • Updated read_spine_config to take const char *file in both the header and implementation.
  • Fixed pthread_self() logging format specifier from %ld to %lu to match the (unsigned long int) cast.

Reviewed changes

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

File Description
util.h Updates read_spine_config declaration to const char * for const-correctness.
util.c Updates read_spine_config definition/docs to match header; fixes pthread_self() log prefix format specifier.

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

You can also share your feedback on Copilot code review. Take the survey.

@somethingwithproof somethingwithproof force-pushed the fix/warnings-followup-pr branch from 83bb31f to 73259b2 Compare March 12, 2026 07:41
Refs Cacti#452

Use const for read_spine_config file path.

Use %lu for pthread_self logging cast.

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
@netniV netniV merged commit c33a394 into Cacti:develop Mar 12, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(util): tighten const usage and pthread format (tracking issue)

4 participants