mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2026-04-25 05:16:00 +03:00
[PR #2801] [MERGED] Changed string::assign to explicitly specify last argument #2800
Labels
No labels
bug
bug
dataloss
duplicate
enhancement
feature request
help wanted
invalid
need info
performance
pull-request
question
question
testing
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/s3fs-fuse#2800
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/s3fs-fuse/s3fs-fuse/pull/2801
Author: @ggtakec
Created: 2/11/2026
Status: ✅ Merged
Merged: 2/11/2026
Merged by: @gaul
Base:
master← Head:fix/assign📝 Commits (1)
679307aChanged string::assign to explicitly specify last argument📊 Changes
1 file changed (+1 additions, -1 deletions)
View changed files
📝
src/cache_node.cpp(+1 -1)📄 Description
Relevant Issue (if applicable)
https://github.com/s3fs-fuse/s3fs-fuse/issues/2772#issuecomment-3868137428
Details
In CentOS7 + devtools-7(gcc (GCC) 7.3.1 20180303 (Red Hat 7.3.1-5)), the definition of std::string::assign is slightly different from other versions, causing the build to fail.
This is because there is no default value for
ninstd::string& assign(const std::string& str, size_type pos, size_type n=npos).This can be avoided by specifying
nexplicitly. Alternatively, or we can use std::string& assign(const char* pstr, size_type pos).(This PR fixes by the former.)
Of course, I didn't want to make this change for suppoting C++03, but this single fix allows us to continue building on CentOS7.
There's also the question of how long we'll support CentOS7, but I would like to make this fix for now.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.