mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2025-02-03 02:58:26 +00:00
Address clang-tidy warnings (#2010)
This commit is contained in:
parent
b8dd466988
commit
07535ec3ec
@ -99,23 +99,17 @@ bool S3fsCred::ParseIAMRoleFromMetaDataResponse(const char* response, std::strin
|
|||||||
//-------------------------------------------------------------------
|
//-------------------------------------------------------------------
|
||||||
S3fsCred::S3fsCred() :
|
S3fsCred::S3fsCred() :
|
||||||
is_lock_init(false),
|
is_lock_init(false),
|
||||||
passwd_file(""),
|
|
||||||
aws_profile(DEFAULT_AWS_PROFILE_NAME),
|
aws_profile(DEFAULT_AWS_PROFILE_NAME),
|
||||||
load_iamrole(false),
|
load_iamrole(false),
|
||||||
AWSAccessKeyId(""),
|
|
||||||
AWSSecretAccessKey(""),
|
|
||||||
AWSAccessToken(""),
|
|
||||||
AWSAccessTokenExpire(0),
|
AWSAccessTokenExpire(0),
|
||||||
is_ecs(false),
|
is_ecs(false),
|
||||||
is_use_session_token(false),
|
is_use_session_token(false),
|
||||||
is_ibm_iam_auth(false),
|
is_ibm_iam_auth(false),
|
||||||
IAM_cred_url("http://169.254.169.254/latest/meta-data/iam/security-credentials/"),
|
IAM_cred_url("http://169.254.169.254/latest/meta-data/iam/security-credentials/"),
|
||||||
IAM_api_version(2),
|
IAM_api_version(2),
|
||||||
IAMv2_api_token(""),
|
|
||||||
IAM_field_count(4),
|
IAM_field_count(4),
|
||||||
IAM_token_field("Token"),
|
IAM_token_field("Token"),
|
||||||
IAM_expiry_field("Expiration"),
|
IAM_expiry_field("Expiration")
|
||||||
IAM_role("")
|
|
||||||
{
|
{
|
||||||
pthread_mutexattr_t attr;
|
pthread_mutexattr_t attr;
|
||||||
pthread_mutexattr_init(&attr);
|
pthread_mutexattr_init(&attr);
|
||||||
|
@ -119,7 +119,7 @@ class S3fsCred
|
|||||||
bool ParseS3fsPasswdFile(bucketkvmap_t& resmap);
|
bool ParseS3fsPasswdFile(bucketkvmap_t& resmap);
|
||||||
bool ReadS3fsPasswdFile(AutoLock::Type type);
|
bool ReadS3fsPasswdFile(AutoLock::Type type);
|
||||||
|
|
||||||
int CheckS3fsCredentialAwsFormat(const kvmap_t& kvmap, std::string& access_key_id, std::string& secret_access_key);
|
static int CheckS3fsCredentialAwsFormat(const kvmap_t& kvmap, std::string& access_key_id, std::string& secret_access_key);
|
||||||
bool ReadAwsCredentialFile(const std::string &filename, AutoLock::Type type);
|
bool ReadAwsCredentialFile(const std::string &filename, AutoLock::Type type);
|
||||||
|
|
||||||
bool InitialS3fsCredentials();
|
bool InitialS3fsCredentials();
|
||||||
@ -130,7 +130,7 @@ class S3fsCred
|
|||||||
bool SetIAMCredentials(const char* response, AutoLock::Type type);
|
bool SetIAMCredentials(const char* response, AutoLock::Type type);
|
||||||
bool SetIAMRoleFromMetaData(const char* response, AutoLock::Type type);
|
bool SetIAMRoleFromMetaData(const char* response, AutoLock::Type type);
|
||||||
|
|
||||||
bool CheckForbiddenBucketParams();
|
static bool CheckForbiddenBucketParams();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static bool SetBucket(const char* bucket);
|
static bool SetBucket(const char* bucket);
|
||||||
|
@ -216,7 +216,8 @@ bool ThreadPoolMan::StopThreads()
|
|||||||
thread_list.clear();
|
thread_list.clear();
|
||||||
|
|
||||||
// reset semaphore(to zero)
|
// reset semaphore(to zero)
|
||||||
while(thpoolman_sem.try_wait());
|
while(thpoolman_sem.try_wait()){
|
||||||
|
}
|
||||||
|
|
||||||
// clear instructions
|
// clear instructions
|
||||||
for(thpoolman_params_t::const_iterator iter = instruction_list.begin(); iter != instruction_list.end(); ++iter){
|
for(thpoolman_params_t::const_iterator iter = instruction_list.begin(); iter != instruction_list.end(); ++iter){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user