Updates for clang-tidy 15 (#2058)

This commit is contained in:
Andrew Gaul 2022-11-21 23:29:35 +09:00 committed by GitHub
parent 465986e397
commit 956eb77369
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 5 deletions

View File

@ -1,6 +1,7 @@
Checks: ' Checks: '
-*, -*,
bugprone-*, bugprone-*,
-bugprone-assignment-in-if-condition,
-bugprone-branch-clone, -bugprone-branch-clone,
-bugprone-easily-swappable-parameters, -bugprone-easily-swappable-parameters,
-bugprone-implicit-widening-of-multiplication-result, -bugprone-implicit-widening-of-multiplication-result,
@ -16,6 +17,7 @@ Checks: '
-google-runtime-int, -google-runtime-int,
-google-runtime-references, -google-runtime-references,
misc-*, misc-*,
-misc-const-correctness,
-misc-no-recursion, -misc-no-recursion,
-misc-redundant-expression, -misc-redundant-expression,
-misc-unused-parameters, -misc-unused-parameters,
@ -23,6 +25,7 @@ Checks: '
-modernize-avoid-c-arrays, -modernize-avoid-c-arrays,
-modernize-deprecated-headers, -modernize-deprecated-headers,
-modernize-loop-convert, -modernize-loop-convert,
-modernize-raw-string-literal,
-modernize-return-braced-init-list, -modernize-return-braced-init-list,
-modernize-use-auto, -modernize-use-auto,
-modernize-use-nullptr, -modernize-use-nullptr,
@ -35,9 +38,11 @@ Checks: '
-readability-else-after-return, -readability-else-after-return,
-readability-function-cognitive-complexity, -readability-function-cognitive-complexity,
-readability-function-size, -readability-function-size,
-readability-identifier-length,
-readability-implicit-bool-conversion, -readability-implicit-bool-conversion,
-readability-inconsistent-declaration-parameter-name, -readability-inconsistent-declaration-parameter-name,
-readability-isolate-declaration, -readability-isolate-declaration,
-readability-magic-numbers, -readability-magic-numbers,
-readability-named-parameter, -readability-named-parameter,
-readability-simplify-boolean-expr' -readability-simplify-boolean-expr,
-readability-suspicious-call-argument'

View File

@ -49,9 +49,7 @@ void* PseudoFdInfo::MultipartUploadThreadWorker(void* arg)
{ {
pseudofdinfo_thparam* pthparam = static_cast<pseudofdinfo_thparam*>(arg); pseudofdinfo_thparam* pthparam = static_cast<pseudofdinfo_thparam*>(arg);
if(!pthparam || !(pthparam->ppseudofdinfo)){ if(!pthparam || !(pthparam->ppseudofdinfo)){
if(pthparam){ delete pthparam;
delete pthparam;
}
return reinterpret_cast<void*>(-EIO); return reinterpret_cast<void*>(-EIO);
} }
S3FS_PRN_INFO3("Upload Part Thread [tpath=%s][start=%lld][size=%lld][part=%d]", pthparam->path.c_str(), static_cast<long long>(pthparam->start), static_cast<long long>(pthparam->size), pthparam->part_num); S3FS_PRN_INFO3("Upload Part Thread [tpath=%s][start=%lld][size=%lld][part=%d]", pthparam->path.c_str(), static_cast<long long>(pthparam->start), static_cast<long long>(pthparam->size), pthparam->part_num);

View File

@ -33,7 +33,7 @@
// The minimum pseudo fd value starts 2. // The minimum pseudo fd value starts 2.
// This is to avoid mistakes for 0(stdout) and 1(stderr), which are usually used. // This is to avoid mistakes for 0(stdout) and 1(stderr), which are usually used.
// //
#define MIN_PSEUDOFD_NUMBER 2 static const int MIN_PSEUDOFD_NUMBER = 2;
//------------------------------------------------ //------------------------------------------------
// PseudoFdManager class methods // PseudoFdManager class methods