From 49110c671dadb5343ecd07f4b20c7cc170e36ffa Mon Sep 17 00:00:00 2001 From: Andrew Gaul Date: Fri, 5 Jul 2019 15:06:18 -0700 Subject: [PATCH] Avoid shadowing variable in FdEntity::Open Found via cppcheck 1.88. --- src/fdcache.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/fdcache.cpp b/src/fdcache.cpp index 1eb7938..81ec679 100644 --- a/src/fdcache.cpp +++ b/src/fdcache.cpp @@ -853,7 +853,6 @@ int FdEntity::Open(headers_t* pmeta, off_t size, time_t time, bool no_fd_lock_wa // try to open cache file if(-1 != (fd = open(cachepath.c_str(), O_RDWR)) && pagelist.Serialize(cfstat, false)){ // succeed to open cache file and to load stats data - struct stat st; memset(&st, 0, sizeof(struct stat)); if(-1 == fstat(fd, &st)){ S3FS_PRN_ERR("fstat is failed. errno(%d)", errno);