Change #271710
| Category | curl |
| Changed by | Viktor Szakats <commit@vsz.me> |
| Changed at | Thu 18 Jun 2026 21:12:17 |
| Repository | https://github.com/curl/curl.git |
| Project | curl |
| Branch | master |
| Revision | e44f1a1446f8e72573e5a1026807e71a0495f88d |
Comments
smb: constify `strchr()` result variable
Fixing (as seen with gcc-15 on Ubuntu 26.04):
```
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 4e5908306ad5febee88f7eae8ea3b0c41a6b7d84 #20428
Follow-up to 7dc60bdb90c710c2e36b2d05aa3686ff491a9bbe #20425
Follow-up to 0e2507a3c65376d6bda860ff20bd94ada9bbb9fd #20421
Cherry-picked from #22092
Closes #22094
Changed files
- lib/smb.c