Skip to content

🐛 Fix warning from strchr return value assignment#268

Closed
drepper wants to merge 1 commit into
jsoftware:masterfrom
drepper:master
Closed

🐛 Fix warning from strchr return value assignment#268
drepper wants to merge 1 commit into
jsoftware:masterfrom
drepper:master

Conversation

@drepper
Copy link
Copy Markdown

@drepper drepper commented May 11, 2026

The strchr in C is originally documented to return a char* value but this changed in ISO C23. Now the default is to use a type-generic function macro which returns the const-ness according to the parameter type. This is the default for gcc 16.

This patch changes the local variable type and also removes the now unnecessary cast in the following expression.

The strchr in C is originally documented to return a char* value but
this changed in ISO C23.  Now the default is to use a type-generic
function macro which returns the const-ness according to the parameter
type.  This is the default for gcc 16.

This patch changes the local variable type and also removes the now
unnecessary cast in the following expression.
@HenryHRich
Copy link
Copy Markdown
Contributor

Thank you for the update. I have applied it to the repo.

@HenryHRich HenryHRich closed this May 11, 2026
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.

2 participants