smb: constify strchr() result variable#22094
Closed
vszakats wants to merge 1 commit into
Closed
Conversation
Fixing:
```
../../lib/smb.c: In function 'smb_connect':
../../lib/smb.c:491:9: error: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
491 | slash = strchr(user, '/');
| ^
../../lib/smb.c:493:11: error: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
493 | slash = strchr(user, '\\');
| ^
```
Ref: https://github.com/curl/curl/actions/runs/27778098314/job/82195462418?pr=22092
Follow-up to 4e59083 curl#20428
Follow-up to 7dc60bd curl#20425
Follow-up to 0e2507a curl#20421
2 tasks
vszakats
added a commit
that referenced
this pull request
Jun 25, 2026
In jobs that may benefit from newer tool versions (pyspelling, possibly CodeQL, CM integration, configure-vs-cmake). Also curl-for-win to match the curl/curl-for-win repo that also bumped. Bump some Linux jobs to add variation. Also the rest of `check*` jobs for no particular reason other than using the latest. Follow-up to 8f5e4f0 #22097 Follow-up to 139ce4d #22096 Follow-up to e44f1a1 #22094 Closes #22092
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.
Fixing (as seen with gcc-15 on Ubuntu 26.04):
Ref: https://github.com/curl/curl/actions/runs/27778098314/job/82195462418?pr=22092
Follow-up to 4e59083 #20428
Follow-up to 7dc60bd #20425
Follow-up to 0e2507a #20421
Cherry-picked from #22092