Ticket #5113: fix build due to C23 string function prototype changes#5113
Merged
Ticket #5113: fix build due to C23 string function prototype changes#5113
Conversation
…prototype change
```
path.c: In function 'vfs_path_from_str_deprecated_parser':
path.c:360:20: error: assignment discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
360 | url_params = strchr (op, ':'); // skip VFS prefix
| ^
```
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
```
replace.c: In function 'str_replace_all':
replace.c:69:27: error: assignment discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
69 | while ((needle_in_str = strstr (haystack, needle)) != NULL)
| ^
```
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
```
serialize.c: In function 'mc_deserialize_str':
serialize.c:155:18: error: assignment discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
155 | semi_ptr = strchr (data + 1, SRLZ_DELIM_C);
| ^
```
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
```
find.c: In function 'find_ignore_dir_search':
find.c:1174:19: error: assignment discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
1174 | d = strstr (dir, *ignore_dir);
| ^
```
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
```
panel.c: In function 'chdir_other_panel':
panel.c:2976:20: error: assignment discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
2976 | curr_entry = strrchr (vfs_path_get_last_path_str (panel->cwd_vpath), PATH_SEP);
| ^
```
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
Member
Author
|
@mc-worker, could you please have a look and fix it directly if you don't like something? |
mc-worker
approved these changes
May 9, 2026
Member
Author
|
/rebase |
```
extfs.c: In function 'extfs_find_entry_int':
extfs.c:254:11: error: assignment discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
254 | q = strchr (p, PATH_SEP);
| ^
```
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
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.
I just want to unblock the CI, so that I can merge PRs. Therefore, I'm not rewriting the code to make it better, but just trying to make sure that it remains correct and functions like it was before.
The part about
extfs_find_entry_intI find particularly disgusting. Apparently, this function was modifying strings passed to it through pointer trickery without the callers even knowing. I don't know of a simple way to fix this without rewriting other than just making a copy of the incoming string. The whole logic of this function doesn't make sense to me.Blocking: