Remove more unneeded headers identified by IWYU (#2011)

This commit is contained in:
Andrew Gaul 2022-07-30 12:06:47 +09:00 committed by GitHub
parent 5a2172dc56
commit 48e9e51f4f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
42 changed files with 76 additions and 69 deletions

View File

@ -20,9 +20,9 @@
#include <cstdio> #include <cstdio>
#include <cstdlib> #include <cstdlib>
#include <cstring>
#include "common.h" #include "s3fs_logger.h"
#include "s3fs.h"
#include "bodydata.h" #include "bodydata.h"
//------------------------------------------------------------------- //-------------------------------------------------------------------

View File

@ -18,14 +18,13 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/ */
#include <cerrno>
#include <cstdio>
#include <cstdlib>
#include <algorithm> #include <algorithm>
#include <cerrno>
#include <cstdlib>
#include <vector>
#include "common.h"
#include "s3fs.h" #include "s3fs.h"
#include "s3fs_logger.h"
#include "s3fs_util.h" #include "s3fs_util.h"
#include "cache.h" #include "cache.h"
#include "autolock.h" #include "autolock.h"
@ -571,7 +570,7 @@ bool StatCache::TruncateCache()
erase_iters.push_back(iter); erase_iters.push_back(iter);
} }
if(erase_count < erase_iters.size()){ if(erase_count < erase_iters.size()){
sort(erase_iters.begin(), erase_iters.end(), sort_statiterlist()); std::sort(erase_iters.begin(), erase_iters.end(), sort_statiterlist());
while(erase_count < erase_iters.size()){ while(erase_count < erase_iters.size()){
erase_iters.pop_back(); erase_iters.pop_back();
} }

View File

@ -21,6 +21,8 @@
#ifndef S3FS_CACHE_H_ #ifndef S3FS_CACHE_H_
#define S3FS_CACHE_H_ #define S3FS_CACHE_H_
#include <cstring>
#include "metaheader.h" #include "metaheader.h"
//------------------------------------------------------------------- //-------------------------------------------------------------------

View File

@ -21,11 +21,10 @@
#ifndef S3FS_COMMON_H_ #ifndef S3FS_COMMON_H_
#define S3FS_COMMON_H_ #define S3FS_COMMON_H_
#include <fcntl.h> #include <sys/types.h>
#include "../config.h" #include "../config.h"
#include "types.h" #include "types.h"
#include "s3fs_logger.h"
//------------------------------------------------------------------- //-------------------------------------------------------------------
// Global variables // Global variables

View File

@ -21,8 +21,6 @@
#include <cstdio> #include <cstdio>
#include <string> #include <string>
#include "common.h"
#include "s3fs.h"
#include "s3fs_auth.h" #include "s3fs_auth.h"
#include "string_util.h" #include "string_util.h"

View File

@ -29,11 +29,14 @@
#include "common.h" #include "common.h"
#include "s3fs.h" #include "s3fs.h"
#include "s3fs_logger.h"
#include "curl.h" #include "curl.h"
#include "curl_multi.h" #include "curl_multi.h"
#include "curl_util.h" #include "curl_util.h"
#include "s3fs_auth.h" #include "s3fs_auth.h"
#include "autolock.h" #include "autolock.h"
#include "curl_handlerpool.h"
#include "s3fs_cred.h"
#include "s3fs_util.h" #include "s3fs_util.h"
#include "string_util.h" #include "string_util.h"
#include "addhead.h" #include "addhead.h"

View File

@ -26,12 +26,10 @@
#include <map> #include <map>
#include <vector> #include <vector>
#include "common.h" #include "autolock.h"
#include "curl_handlerpool.h"
#include "bodydata.h" #include "bodydata.h"
#include "metaheader.h" #include "metaheader.h"
#include "fdcache_page.h" #include "fdcache_page.h"
#include "s3fs_cred.h"
//---------------------------------------------- //----------------------------------------------
// Avoid dependency on libcurl version // Avoid dependency on libcurl version
@ -76,6 +74,8 @@ typedef std::map<CURL*, progress_t> curlprogress_t;
//---------------------------------------------- //----------------------------------------------
// class S3fsCurl // class S3fsCurl
//---------------------------------------------- //----------------------------------------------
class CurlHandlerPool;
class S3fsCred;
class S3fsCurl; class S3fsCurl;
class Semaphore; class Semaphore;

View File

@ -20,8 +20,7 @@
#include <cstdio> #include <cstdio>
#include "common.h" #include "s3fs_logger.h"
#include "s3fs.h"
#include "curl_handlerpool.h" #include "curl_handlerpool.h"
#include "autolock.h" #include "autolock.h"

View File

@ -21,9 +21,10 @@
#include <cstdio> #include <cstdio>
#include <cstdlib> #include <cstdlib>
#include <cerrno> #include <cerrno>
#include <vector>
#include "common.h"
#include "s3fs.h" #include "s3fs.h"
#include "s3fs_logger.h"
#include "curl_multi.h" #include "curl_multi.h"
#include "curl.h" #include "curl.h"
#include "autolock.h" #include "autolock.h"

View File

@ -23,7 +23,7 @@
#include <curl/curl.h> #include <curl/curl.h>
#include "common.h" #include "common.h"
#include "s3fs.h" #include "s3fs_logger.h"
#include "curl_util.h" #include "curl_util.h"
#include "string_util.h" #include "string_util.h"
#include "s3fs_auth.h" #include "s3fs_auth.h"

View File

@ -23,13 +23,12 @@
#include <cerrno> #include <cerrno>
#include <climits> #include <climits>
#include <unistd.h> #include <unistd.h>
#include <sys/types.h>
#include <dirent.h> #include <dirent.h>
#include <sys/stat.h>
#include <sys/statvfs.h>
#include "common.h"
#include "s3fs.h"
#include "fdcache.h" #include "fdcache.h"
#include "fdcache_pseudofd.h" #include "fdcache_stat.h"
#include "s3fs_util.h" #include "s3fs_util.h"
#include "s3fs_logger.h" #include "s3fs_logger.h"
#include "s3fs_cred.h" #include "s3fs_cred.h"

View File

@ -20,8 +20,7 @@
#include <cstdio> #include <cstdio>
#include "common.h" #include "s3fs_logger.h"
#include "s3fs.h"
#include "fdcache_auto.h" #include "fdcache_auto.h"
#include "fdcache.h" #include "fdcache.h"

View File

@ -21,8 +21,12 @@
#ifndef S3FS_FDCACHE_AUTO_H_ #ifndef S3FS_FDCACHE_AUTO_H_
#define S3FS_FDCACHE_AUTO_H_ #define S3FS_FDCACHE_AUTO_H_
#include <fcntl.h>
#include "autolock.h" #include "autolock.h"
#include "fdcache_entity.h" #include "metaheader.h"
class FdEntity;
//------------------------------------------------ //------------------------------------------------
// class AutoFdEntity // class AutoFdEntity

View File

@ -23,16 +23,19 @@
#include <cerrno> #include <cerrno>
#include <unistd.h> #include <unistd.h>
#include <limits.h> #include <limits.h>
#include <sys/time.h> #include <sys/stat.h>
#include "common.h" #include "common.h"
#include "s3fs.h"
#include "fdcache_entity.h" #include "fdcache_entity.h"
#include "fdcache_stat.h"
#include "fdcache_untreated.h"
#include "fdcache.h" #include "fdcache.h"
#include "string_util.h" #include "string_util.h"
#include "s3fs_logger.h"
#include "s3fs_util.h" #include "s3fs_util.h"
#include "autolock.h" #include "autolock.h"
#include "curl.h" #include "curl.h"
#include "s3fs_cred.h"
//------------------------------------------------ //------------------------------------------------
// Symbols // Symbols

View File

@ -21,6 +21,8 @@
#ifndef S3FS_FDCACHE_ENTITY_H_ #ifndef S3FS_FDCACHE_ENTITY_H_
#define S3FS_FDCACHE_ENTITY_H_ #define S3FS_FDCACHE_ENTITY_H_
#include <fcntl.h>
#include "autolock.h" #include "autolock.h"
#include "fdcache_page.h" #include "fdcache_page.h"
#include "fdcache_fdinfo.h" #include "fdcache_fdinfo.h"

View File

@ -21,10 +21,11 @@
#include <cstdio> #include <cstdio>
#include <cstdlib> #include <cstdlib>
#include <errno.h> #include <errno.h>
#include <sys/stat.h>
#include <unistd.h> #include <unistd.h>
#include "common.h" #include "common.h"
#include "s3fs.h" #include "s3fs_logger.h"
#include "fdcache_fdinfo.h" #include "fdcache_fdinfo.h"
#include "fdcache_pseudofd.h" #include "fdcache_pseudofd.h"
#include "fdcache_entity.h" #include "fdcache_entity.h"

View File

@ -21,12 +21,13 @@
#ifndef S3FS_FDCACHE_FDINFO_H_ #ifndef S3FS_FDCACHE_FDINFO_H_
#define S3FS_FDCACHE_FDINFO_H_ #define S3FS_FDCACHE_FDINFO_H_
#include "fdcache_untreated.h"
#include "psemaphore.h" #include "psemaphore.h"
#include "metaheader.h" #include "metaheader.h"
#include "autolock.h" #include "autolock.h"
#include "types.h"
class FdEntity; class FdEntity;
class UntreatedParts;
//------------------------------------------------ //------------------------------------------------
// Structure of parameters to pass to thread // Structure of parameters to pass to thread

View File

@ -22,10 +22,12 @@
#include <cerrno> #include <cerrno>
#include <unistd.h> #include <unistd.h>
#include <sstream> #include <sstream>
#include <sys/stat.h>
#include "common.h" #include "common.h"
#include "s3fs.h" #include "s3fs_logger.h"
#include "fdcache_page.h" #include "fdcache_page.h"
#include "fdcache_stat.h"
#include "string_util.h" #include "string_util.h"
//------------------------------------------------ //------------------------------------------------

View File

@ -24,8 +24,6 @@
#include <list> #include <list>
#include <sys/types.h> #include <sys/types.h>
#include "fdcache_stat.h"
//------------------------------------------------ //------------------------------------------------
// Symbols // Symbols
//------------------------------------------------ //------------------------------------------------
@ -68,6 +66,7 @@ typedef std::list<struct fdpage> fdpage_list_t;
//------------------------------------------------ //------------------------------------------------
// Class PageList // Class PageList
//------------------------------------------------ //------------------------------------------------
class CacheFileStat;
class FdEntity; class FdEntity;
// cppcheck-suppress copyCtorAndEqOperator // cppcheck-suppress copyCtorAndEqOperator

View File

@ -18,11 +18,11 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/ */
#include <cstdlib>
#include <algorithm> #include <algorithm>
#include <cstdlib>
#include <vector>
#include "common.h" #include "s3fs_logger.h"
#include "s3fs.h"
#include "fdcache_pseudofd.h" #include "fdcache_pseudofd.h"
#include "autolock.h" #include "autolock.h"

View File

@ -21,9 +21,9 @@
#include <cerrno> #include <cerrno>
#include <unistd.h> #include <unistd.h>
#include <sys/file.h> #include <sys/file.h>
#include <sys/stat.h>
#include "common.h" #include "s3fs_logger.h"
#include "s3fs.h"
#include "fdcache_stat.h" #include "fdcache_stat.h"
#include "fdcache.h" #include "fdcache.h"
#include "s3fs_util.h" #include "s3fs_util.h"

View File

@ -20,8 +20,7 @@
#include <cstdlib> #include <cstdlib>
#include "common.h" #include "s3fs_logger.h"
#include "s3fs.h"
#include "fdcache_untreated.h" #include "fdcache_untreated.h"
#include "autolock.h" #include "autolock.h"

View File

@ -41,6 +41,7 @@
#include "common.h" #include "common.h"
#include "s3fs.h" #include "s3fs.h"
#include "s3fs_auth.h" #include "s3fs_auth.h"
#include "s3fs_logger.h"
//------------------------------------------------------------------- //-------------------------------------------------------------------
// Utility Function for version // Utility Function for version

View File

@ -19,10 +19,10 @@
*/ */
#include <unistd.h> #include <unistd.h>
#include <sys/stat.h>
#include <sys/types.h> #include <sys/types.h>
#include "common.h" #include "common.h"
#include "s3fs.h"
#include "metaheader.h" #include "metaheader.h"
#include "string_util.h" #include "string_util.h"

View File

@ -22,6 +22,7 @@
#define S3FS_METAHEADER_H_ #define S3FS_METAHEADER_H_
#include <string> #include <string>
#include <strings.h>
#include <map> #include <map>
//------------------------------------------------------------------- //-------------------------------------------------------------------

View File

@ -21,8 +21,8 @@
#include <cstdio> #include <cstdio>
#include <cstdlib> #include <cstdlib>
#include "common.h"
#include "s3fs.h" #include "s3fs.h"
#include "s3fs_logger.h"
#include "mpu_util.h" #include "mpu_util.h"
#include "curl.h" #include "curl.h"
#include "s3fs_xml.h" #include "s3fs_xml.h"

View File

@ -20,8 +20,8 @@
#include <cstdio> #include <cstdio>
#include <cstdlib> #include <cstdlib>
#include <cstring>
#include "common.h"
#include "s3fs.h" #include "s3fs.h"
#include "mvnode.h" #include "mvnode.h"

View File

@ -37,6 +37,7 @@
#include "common.h" #include "common.h"
#include "s3fs.h" #include "s3fs.h"
#include "s3fs_auth.h" #include "s3fs_auth.h"
#include "s3fs_logger.h"
//------------------------------------------------------------------- //-------------------------------------------------------------------
// Utility Function for version // Utility Function for version

View File

@ -23,12 +23,7 @@
#include <cerrno> #include <cerrno>
#include <pthread.h> #include <pthread.h>
#include <unistd.h> #include <unistd.h>
#include <syslog.h>
#include <sys/types.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <cstring>
#include <openssl/bio.h>
#include <openssl/buffer.h>
#include <openssl/evp.h> #include <openssl/evp.h>
#include <openssl/hmac.h> #include <openssl/hmac.h>
#include <openssl/md5.h> #include <openssl/md5.h>
@ -36,11 +31,9 @@
#include <openssl/crypto.h> #include <openssl/crypto.h>
#include <openssl/err.h> #include <openssl/err.h>
#include <string> #include <string>
#include <map>
#include "common.h"
#include "s3fs.h"
#include "s3fs_auth.h" #include "s3fs_auth.h"
#include "s3fs_logger.h"
//------------------------------------------------------------------- //-------------------------------------------------------------------
// Utility Function for version // Utility Function for version

View File

@ -23,15 +23,16 @@
#include <errno.h> #include <errno.h>
#include <unistd.h> #include <unistd.h>
#include <dirent.h> #include <dirent.h>
#include <pwd.h>
#include <sys/types.h> #include <sys/types.h>
#include <getopt.h> #include <getopt.h>
#include "common.h" #include "common.h"
#include "s3fs.h" #include "s3fs.h"
#include "s3fs_logger.h"
#include "metaheader.h" #include "metaheader.h"
#include "fdcache.h" #include "fdcache.h"
#include "fdcache_auto.h" #include "fdcache_auto.h"
#include "fdcache_stat.h"
#include "curl.h" #include "curl.h"
#include "curl_multi.h" #include "curl_multi.h"
#include "s3objlist.h" #include "s3objlist.h"
@ -40,9 +41,9 @@
#include "addhead.h" #include "addhead.h"
#include "sighandlers.h" #include "sighandlers.h"
#include "s3fs_xml.h" #include "s3fs_xml.h"
#include "s3fs_util.h"
#include "string_util.h" #include "string_util.h"
#include "s3fs_auth.h" #include "s3fs_auth.h"
#include "s3fs_cred.h"
#include "s3fs_help.h" #include "s3fs_help.h"
#include "s3fs_util.h" #include "s3fs_util.h"
#include "mpu_util.h" #include "mpu_util.h"

View File

@ -21,13 +21,14 @@
#include <errno.h> #include <errno.h>
#include <unistd.h> #include <unistd.h>
#include <pwd.h> #include <pwd.h>
#include <sys/stat.h>
#include <sys/types.h> #include <sys/types.h>
#include <fstream> #include <fstream>
#include <sstream> #include <sstream>
#include "common.h" #include "common.h"
#include "s3fs.h"
#include "s3fs_cred.h" #include "s3fs_cred.h"
#include "s3fs_logger.h"
#include "curl.h" #include "curl.h"
#include "string_util.h" #include "string_util.h"
#include "metaheader.h" #include "metaheader.h"

View File

@ -18,7 +18,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/ */
#include <sys/types.h>
#include <string> #include <string>
//------------------------------------------------------------------- //-------------------------------------------------------------------

View File

@ -23,7 +23,6 @@
#include <string> #include <string>
#include "common.h" #include "common.h"
#include "s3fs.h"
#include "s3fs_help.h" #include "s3fs_help.h"
#include "s3fs_auth.h" #include "s3fs_auth.h"

View File

@ -27,6 +27,8 @@
#include <syslog.h> #include <syslog.h>
#include <sys/time.h> #include <sys/time.h>
#include "common.h"
#ifdef CLOCK_MONOTONIC_COARSE #ifdef CLOCK_MONOTONIC_COARSE
#define S3FS_CLOCK_MONOTONIC CLOCK_MONOTONIC_COARSE #define S3FS_CLOCK_MONOTONIC CLOCK_MONOTONIC_COARSE
#else #else

View File

@ -26,14 +26,13 @@
#include <pwd.h> #include <pwd.h>
#include <libgen.h> #include <libgen.h>
#include <dirent.h> #include <dirent.h>
#include <sys/types.h> #include <sys/stat.h>
#include <sys/utsname.h> #include <sys/utsname.h>
#include <string> #include <string>
#include <sstream> #include <sstream>
#include "common.h" #include "s3fs_logger.h"
#include "s3fs.h"
#include "s3fs_util.h" #include "s3fs_util.h"
#include "string_util.h" #include "string_util.h"
#include "s3fs_help.h" #include "s3fs_help.h"

View File

@ -24,6 +24,7 @@
#include "common.h" #include "common.h"
#include "s3fs.h" #include "s3fs.h"
#include "s3fs_logger.h"
#include "s3fs_xml.h" #include "s3fs_xml.h"
#include "s3fs_util.h" #include "s3fs_util.h"
#include "s3objlist.h" #include "s3objlist.h"

View File

@ -22,8 +22,7 @@
#include <csignal> #include <csignal>
#include <pthread.h> #include <pthread.h>
#include "common.h" #include "s3fs_logger.h"
#include "s3fs.h"
#include "sighandlers.h" #include "sighandlers.h"
#include "fdcache.h" #include "fdcache.h"

View File

@ -18,7 +18,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/ */
#include <cstdio>
#include <cstdlib> #include <cstdlib>
#include <cstring> #include <cstring>
#include <cerrno> #include <cerrno>
@ -27,8 +26,7 @@
#include <sstream> #include <sstream>
#include "common.h" #include "s3fs_logger.h"
#include "s3fs.h"
#include "string_util.h" #include "string_util.h"
//------------------------------------------------------------------- //-------------------------------------------------------------------

View File

@ -21,6 +21,8 @@
#ifndef S3FS_STRING_UTIL_H_ #ifndef S3FS_STRING_UTIL_H_
#define S3FS_STRING_UTIL_H_ #define S3FS_STRING_UTIL_H_
#include <cstring>
// //
// A collection of string utilities for manipulating URLs and HTTP responses. // A collection of string utilities for manipulating URLs and HTTP responses.
// //

View File

@ -18,7 +18,8 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/ */
#include "fdcache.h" #include "fdcache_page.h"
#include "fdcache_stat.h"
#include "test_util.h" #include "test_util.h"
bool CacheFileStat::Open() { return false; } bool CacheFileStat::Open() { return false; }

View File

@ -23,8 +23,7 @@
#include <stdint.h> #include <stdint.h>
#include <string> #include <string>
#include "common.h" #include "s3fs_logger.h"
#include "s3fs.h"
#include "string_util.h" #include "string_util.h"
#include "test_util.h" #include "test_util.h"

View File

@ -21,9 +21,9 @@
#include <cstdio> #include <cstdio>
#include <cstdlib> #include <cstdlib>
#include <errno.h> #include <errno.h>
#include <stdint.h>
#include "common.h" #include "s3fs_logger.h"
#include "s3fs.h"
#include "threadpoolman.h" #include "threadpoolman.h"
#include "autolock.h" #include "autolock.h"