mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2025-01-03 05:00:15 +00:00
Address clang-tidy 17 warnings (#2362)
This commit is contained in:
parent
807ec1f6f7
commit
0cd73e406d
@ -36,6 +36,7 @@ Checks: '
|
||||
-google-runtime-references,
|
||||
misc-*,
|
||||
-misc-const-correctness,
|
||||
-misc-include-cleaner,
|
||||
-misc-no-recursion,
|
||||
-misc-redundant-expression,
|
||||
-misc-unused-parameters,
|
||||
@ -52,6 +53,7 @@ Checks: '
|
||||
-modernize-use-trailing-return-type,
|
||||
-modernize-use-using,
|
||||
performance-*,
|
||||
-performance-avoid-endl,
|
||||
-performance-no-int-to-ptr,
|
||||
portability-*,
|
||||
readability-*,
|
||||
|
@ -2139,7 +2139,10 @@ bool S3fsCurl::RemakeHandle()
|
||||
// rewind file
|
||||
struct stat st;
|
||||
if(b_infile){
|
||||
rewind(b_infile);
|
||||
if(-1 == fseek(b_infile, 0, SEEK_SET)){
|
||||
S3FS_PRN_WARN("Could not reset position(fd=%d)", fileno(b_infile));
|
||||
return false;
|
||||
}
|
||||
if(-1 == fstat(fileno(b_infile), &st)){
|
||||
S3FS_PRN_WARN("Could not get file stat(fd=%d)", fileno(b_infile));
|
||||
return false;
|
||||
|
10
src/s3fs.cpp
10
src/s3fs.cpp
@ -206,8 +206,8 @@ class MpStatFlag
|
||||
{
|
||||
private:
|
||||
mutable pthread_mutex_t flag_lock;
|
||||
bool is_lock_init;
|
||||
bool has_mp_stat;
|
||||
bool is_lock_init = false;
|
||||
bool has_mp_stat = false;
|
||||
|
||||
public:
|
||||
MpStatFlag();
|
||||
@ -221,7 +221,7 @@ class MpStatFlag
|
||||
bool Set(bool flag);
|
||||
};
|
||||
|
||||
MpStatFlag::MpStatFlag() : is_lock_init(false), has_mp_stat(false)
|
||||
MpStatFlag::MpStatFlag()
|
||||
{
|
||||
pthread_mutexattr_t attr;
|
||||
pthread_mutexattr_init(&attr);
|
||||
@ -273,7 +273,7 @@ class SyncFiller
|
||||
{
|
||||
private:
|
||||
mutable pthread_mutex_t filler_lock;
|
||||
bool is_lock_init;
|
||||
bool is_lock_init = false;
|
||||
void* filler_buff;
|
||||
fuse_fill_dir_t filler_func;
|
||||
std::set<std::string> filled;
|
||||
@ -290,7 +290,7 @@ class SyncFiller
|
||||
int SufficiencyFill(const std::vector<std::string>& pathlist);
|
||||
};
|
||||
|
||||
SyncFiller::SyncFiller(void* buff, fuse_fill_dir_t filler) : is_lock_init(false), filler_buff(buff), filler_func(filler)
|
||||
SyncFiller::SyncFiller(void* buff, fuse_fill_dir_t filler) : filler_buff(buff), filler_func(filler)
|
||||
{
|
||||
if(!filler_buff || !filler_func){
|
||||
S3FS_PRN_CRIT("Internal error: SyncFiller constructor parameter is critical value.");
|
||||
|
Loading…
Reference in New Issue
Block a user