Skip to content

slash: fix strchr assignment type for glibc 2.43#17

Merged
jledet merged 1 commit intomainfrom
fix_strchr-return-type
Mar 16, 2026
Merged

slash: fix strchr assignment type for glibc 2.43#17
jledet merged 1 commit intomainfrom
fix_strchr-return-type

Conversation

@jledet
Copy link
Contributor

@jledet jledet commented Mar 16, 2026

Compiling with glibc 2.43 will create warnings if the the string pointer argument to strchr does not match the assignment type:

warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]

Fix two instances where we called strchr with a const char pointer argument and assigned the return value to a non-const char pointer. The returned pointers were only read, so the functionality is the same.

Compiling with glibc 2.43 will create warnings if the the string pointer
argument to strchr does not match the assignment type:

warning: assignment discards ‘const’ qualifier from pointer target type
[-Wdiscarded-qualifiers]

Fix two instances where we called strchr with a const char pointer
argument and assigned the return value to a non-const char pointer. The
returned pointers were only read, so the functionality is the same.
@jledet jledet merged commit 1289b49 into main Mar 16, 2026
1 check passed
@jledet jledet deleted the fix_strchr-return-type branch March 16, 2026 14:14
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.

1 participant