Update for clang-tidy 12 (#1644)

This commit is contained in:
Andrew Gaul 2021-05-03 09:43:18 +09:00 committed by GitHub
parent c4fa53ec8b
commit cb9148f6cd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 13 additions and 7 deletions

View File

@ -3,6 +3,7 @@ Checks: '
bugprone-*,
-bugprone-branch-clone,
-bugprone-macro-parentheses,
-bugprone-narrowing-conversions,
-bugprone-unhandled-self-assignment,
google-*,
-google-build-using-namespace,
@ -24,10 +25,11 @@ Checks: '
-modernize-use-trailing-return-type,
-modernize-use-using,
performance-*,
-performance-inefficient-string-concatenation,
-performance-no-int-to-ptr,
portability-*,
readability-*,
-readability-else-after-return,
-readability-function-cognitive-complexity,
-readability-function-size,
-readability-implicit-bool-conversion,
-readability-inconsistent-declaration-parameter-name,

View File

@ -192,9 +192,11 @@ std::string get_canonical_headers(const struct curl_slist* list)
// skip empty-value headers (as they are discarded by libcurl)
continue;
}
strhead = strkey + ":" + strval;
strhead = strkey;
strhead += ":";
strhead += strval;
}else{
strhead = trim(lower(strhead));
strhead = trim(lower(strhead));
}
canonical_headers += strhead;
canonical_headers += "\n";
@ -221,9 +223,11 @@ std::string get_canonical_headers(const struct curl_slist* list, bool only_amz)
// skip empty-value headers (as they are discarded by libcurl)
continue;
}
strhead = strkey + ":" + strval;
strhead = strkey;
strhead += ":";
strhead += strval;
}else{
strhead = trim(lower(strhead));
strhead = trim(lower(strhead));
}
if(only_amz && strhead.substr(0, 5) != "x-amz"){
continue;

View File

@ -2699,7 +2699,7 @@ static int list_bucket(const char* path, S3ObjList& head, const char* delimiter,
while(truncated){
// append parameters to query in alphabetical order
std::string each_query = "";
std::string each_query;
if(!next_continuation_token.empty()){
each_query += "continuation-token=" + urlEncode(next_continuation_token) + "&";
next_continuation_token = "";

View File

@ -471,7 +471,7 @@ unsigned char* s3fs_decode64(const char* input, size_t* plength)
// Base location for transform. The range 0xE000 - 0xF8ff
// is a private range, se use the start of this range.
static unsigned int escape_base = 0xe000;
static const unsigned int escape_base = 0xe000;
// encode bytes into wobbly utf8.
// 'result' can be null. returns true if transform was needed.