mirror of
https://github.com/curl/curl.git
synced 2026-08-02 08:30:30 +03:00
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 4e5908306a #20428
Follow-up to 7dc60bdb90 #20425
Follow-up to 0e2507a3c6 #20421
Cherry-picked from #22092
Closes #22094
This commit is contained in:
parent
950a30d762
commit
e44f1a1446
1 changed files with 1 additions and 1 deletions
|
|
@ -467,7 +467,7 @@ static CURLcode smb_connect(struct Curl_easy *data, bool *done)
|
|||
{
|
||||
struct connectdata *conn = data->conn;
|
||||
struct smb_conn *smbc = Curl_conn_meta_get(conn, CURL_META_SMB_CONN);
|
||||
char *slash;
|
||||
const char *slash;
|
||||
const char *user = Curl_creds_user(conn->creds);
|
||||
|
||||
(void)done;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue