Conversation
Signed-off-by: Andrew Clayton <ac@sigsegv.uk>
There was a problem hiding this comment.
Pull request overview
This PR updates CLI behavior around logging configuration parsing and refreshes the Individuals Capital Gains Income (ICGI) command/endpoint mappings to reflect newer API operations.
Changes:
- Adjusts
set_log_fp()to avoid mutating the originallog_levelstring by duplicating it before parsing. - Updates ICGI “Residential Property Disposals” commands: renames the prior get command to
non-ppd-getand adds a newppd-getendpoint. - Updates the ICGI module copyright year range.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
src/mtd-cli.c |
Changes how the MTD_CLI_OPT_LOG_LEVEL value is parsed before opening a log file. |
src/mtd-cli-icgi.c |
Renames/extends ICGI residential property disposal commands and maps them to updated API endpoints. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
GCC 16 is throwing
mtd-cli.c: In function ‘set_log_fp’:
mtd-cli.c:397:13: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
397 | ptr = strchr(log_level, ':');
| ^
mtd-cli.c:400:14: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
400 | ptrm = strchr(log_level, '+');
|
IIRC this is due to changes in the return value of various string
functions, now if they take a const src parameter they will return a
pointer to const string.
We pass log_level in as a const string, but then we may end up modifying
it through a non-const pointer. Best to just take a copy of it and
operate on that.
Signed-off-by: Andrew Clayton <ac@sigsegv.uk>
Signed-off-by: Andrew Clayton <ac@sigsegv.uk>
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.
No description provided.