mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2024-12-22 08:48:55 +00:00
Address warnings from clang-tidy 11 (#1470)
This commit is contained in:
parent
d96a08d4ad
commit
543231c9f2
@ -3,6 +3,7 @@ Checks: '
|
||||
bugprone-*,
|
||||
-bugprone-branch-clone,
|
||||
-bugprone-macro-parentheses,
|
||||
-bugprone-unhandled-self-assignment,
|
||||
google-*,
|
||||
-google-build-using-namespace,
|
||||
-google-readability-casting,
|
||||
@ -11,6 +12,7 @@ Checks: '
|
||||
-google-runtime-int,
|
||||
-google-runtime-references,
|
||||
misc-*,
|
||||
-misc-no-recursion,
|
||||
-misc-redundant-expression,
|
||||
-misc-unused-parameters,
|
||||
modernize-*,
|
||||
@ -22,11 +24,13 @@ Checks: '
|
||||
-modernize-use-trailing-return-type,
|
||||
-modernize-use-using,
|
||||
performance-*,
|
||||
-performance-inefficient-string-concatenation,
|
||||
portability-*,
|
||||
readability-*,
|
||||
-readability-else-after-return,
|
||||
-readability-function-size,
|
||||
-readability-implicit-bool-conversion,
|
||||
-readability-inconsistent-declaration-parameter-name,
|
||||
-readability-isolate-declaration,
|
||||
-readability-magic-numbers,
|
||||
-readability-named-parameter,
|
||||
|
@ -1854,10 +1854,10 @@ int S3fsCurl::RawCurlDebugFunc(CURL* hcurl, curl_infotype type, char* data, size
|
||||
// Methods for S3fsCurl
|
||||
//-------------------------------------------------------------------
|
||||
S3fsCurl::S3fsCurl(bool ahbe) :
|
||||
hCurl(NULL), type(REQTYPE_UNSET), path(""), base_path(""), saved_path(""), url(""), requestHeaders(NULL),
|
||||
hCurl(NULL), type(REQTYPE_UNSET), requestHeaders(NULL),
|
||||
LastResponseCode(S3FSCURL_RESPONSECODE_NOTSET), postdata(NULL), postdata_remaining(0), is_use_ahbe(ahbe),
|
||||
retry_count(0), b_infile(NULL), b_postdata(NULL), b_postdata_remaining(0), b_partdata_startpos(0), b_partdata_size(0),
|
||||
b_ssekey_pos(-1), b_ssevalue(""), b_ssetype(sse_type_t::SSE_DISABLE), op(""), query_string(""),
|
||||
b_ssekey_pos(-1), b_ssetype(sse_type_t::SSE_DISABLE),
|
||||
sem(NULL), completed_tids_lock(NULL), completed_tids(NULL), fpLazySetup(NULL)
|
||||
{
|
||||
}
|
||||
|
@ -95,8 +95,8 @@ ino_t FdEntity::GetInode(int fd)
|
||||
//------------------------------------------------
|
||||
FdEntity::FdEntity(const char* tpath, const char* cpath) :
|
||||
is_lock_init(false), refcnt(0), path(SAFESTRPTR(tpath)),
|
||||
fd(-1), pfile(NULL), inode(0), size_orgmeta(0), upload_id(""), mp_start(0), mp_size(0),
|
||||
cachepath(SAFESTRPTR(cpath)), mirrorpath(""), is_meta_pending(false), holding_mtime(-1)
|
||||
fd(-1), pfile(NULL), inode(0), size_orgmeta(0), mp_start(0), mp_size(0),
|
||||
cachepath(SAFESTRPTR(cpath)), is_meta_pending(false), holding_mtime(-1)
|
||||
{
|
||||
pthread_mutexattr_t attr;
|
||||
pthread_mutexattr_init(&attr);
|
||||
|
@ -163,7 +163,7 @@ bool CacheFileStat::RenameCacheFileStat(const char* oldpath, const char* newpath
|
||||
//------------------------------------------------
|
||||
// CacheFileStat methods
|
||||
//------------------------------------------------
|
||||
CacheFileStat::CacheFileStat(const char* tpath) : path(""), fd(-1)
|
||||
CacheFileStat::CacheFileStat(const char* tpath) : fd(-1)
|
||||
{
|
||||
if(tpath && '\0' != tpath[0]){
|
||||
SetPath(tpath, true);
|
||||
|
@ -180,9 +180,7 @@ bool S3fsLog::LowSetLogfile(const char* pfile)
|
||||
fclose(newfp);
|
||||
return false;
|
||||
}
|
||||
if(S3fsLog::plogfile){
|
||||
delete S3fsLog::plogfile;
|
||||
}
|
||||
delete S3fsLog::plogfile;
|
||||
S3fsLog::plogfile = new std::string(pfile);
|
||||
}
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user