Fix clang-tidy 16 nits (#2158)

This commit is contained in:
Andrew Gaul 2023-05-14 01:59:26 +09:00 committed by GitHub
parent 8296fe32cb
commit 59c3b26655
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 3 deletions

View File

@ -21,6 +21,7 @@ Checks: '
-misc-no-recursion,
-misc-redundant-expression,
-misc-unused-parameters,
-misc-use-anonymous-namespace,
modernize-*,
-modernize-avoid-c-arrays,
-modernize-deprecated-headers,
@ -28,6 +29,7 @@ Checks: '
-modernize-raw-string-literal,
-modernize-return-braced-init-list,
-modernize-use-auto,
-modernize-use-emplace,
-modernize-use-nullptr,
-modernize-use-trailing-return-type,
-modernize-use-using,
@ -35,6 +37,7 @@ Checks: '
-performance-no-int-to-ptr,
portability-*,
readability-*,
-readability-braces-around-statements,
-readability-else-after-return,
-readability-function-cognitive-complexity,
-readability-function-size,

View File

@ -1095,14 +1095,14 @@ bool S3fsCurl::SetProxy(const char* url)
pos = 0;
}
// check fqdn and port number string
if(std::string::npos != (pos = tmpurl.find(":", pos))){
if(std::string::npos != (pos = tmpurl.find(':', pos))){
// specify port
if(0 == pos){
// no fqdn(hostname) string before ":"
return false;
}
pos += strlen(":");
if(std::string::npos != tmpurl.find(":", pos)){
if(std::string::npos != tmpurl.find(':', pos)){
// found wrong separator
return false;
}

View File

@ -5300,7 +5300,7 @@ int main(int argc, char* argv[])
#elif defined(__APPLE__)
bucket_size=static_cast<fsblkcnt_t>(INT32_MAX);
#else
bucket_size=static_cast<fsblkcnt_t>(~0);
bucket_size=~0U;
#endif