Address clang-tidy warnings (#2010)

This commit is contained in:
Andrew Gaul 2022-07-29 22:00:07 +09:00 committed by GitHub
parent b8dd466988
commit 07535ec3ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 10 deletions

View File

@ -99,23 +99,17 @@ bool S3fsCred::ParseIAMRoleFromMetaDataResponse(const char* response, std::strin
//-------------------------------------------------------------------
S3fsCred::S3fsCred() :
is_lock_init(false),
passwd_file(""),
aws_profile(DEFAULT_AWS_PROFILE_NAME),
load_iamrole(false),
AWSAccessKeyId(""),
AWSSecretAccessKey(""),
AWSAccessToken(""),
AWSAccessTokenExpire(0),
is_ecs(false),
is_use_session_token(false),
is_ibm_iam_auth(false),
IAM_cred_url("http://169.254.169.254/latest/meta-data/iam/security-credentials/"),
IAM_api_version(2),
IAMv2_api_token(""),
IAM_field_count(4),
IAM_token_field("Token"),
IAM_expiry_field("Expiration"),
IAM_role("")
IAM_expiry_field("Expiration")
{
pthread_mutexattr_t attr;
pthread_mutexattr_init(&attr);

View File

@ -119,7 +119,7 @@ class S3fsCred
bool ParseS3fsPasswdFile(bucketkvmap_t& resmap);
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 InitialS3fsCredentials();
@ -130,7 +130,7 @@ class S3fsCred
bool SetIAMCredentials(const char* response, AutoLock::Type type);
bool SetIAMRoleFromMetaData(const char* response, AutoLock::Type type);
bool CheckForbiddenBucketParams();
static bool CheckForbiddenBucketParams();
public:
static bool SetBucket(const char* bucket);

View File

@ -216,7 +216,8 @@ bool ThreadPoolMan::StopThreads()
thread_list.clear();
// reset semaphore(to zero)
while(thpoolman_sem.try_wait());
while(thpoolman_sem.try_wait()){
}
// clear instructions
for(thpoolman_params_t::const_iterator iter = instruction_list.begin(); iter != instruction_list.end(); ++iter){