From 512cb6568293f26653a4be3e3d08ac561a6c701a Mon Sep 17 00:00:00 2001 From: Richard Russon Date: Thu, 6 Jun 2019 20:38:01 +0100 Subject: [PATCH] check includes with iwyu --- address/address.c | 1 - address/address.h | 2 +- address/group.c | 2 +- address/group.h | 3 +-- conn/socket.h | 1 - email/envelope.h | 2 +- email/parse.c | 2 -- email/parse.h | 1 + email/rfc2231.c | 1 - email/url.c | 1 - hcache/serialize.c | 1 - imap/imap.c | 1 - imap/imap.h | 4 ++-- maildir/shared.c | 2 +- mutt/buffer.c | 1 - mutt/file.c | 1 - mutt/memory.c | 1 - mutt/notify.c | 3 +++ mutt/notify.h | 3 ++- mutt/observer.h | 4 +--- mutt/pool.c | 4 ---- mutt/signal.c | 1 - mutt/string.c | 1 + ncrypt/crypt.c | 1 - ncrypt/crypt_gpgme.c | 1 + ncrypt/crypt_mod_pgp_gpgme.c | 1 + ncrypt/crypt_mod_smime_gpgme.c | 1 + ncrypt/cryptglue.c | 1 + ncrypt/ncrypt.h | 1 - ncrypt/pgpinvoke.c | 2 -- ncrypt/pgpkey.c | 2 +- pop/pop_auth.c | 1 - 32 files changed, 20 insertions(+), 34 deletions(-) diff --git a/address/address.c b/address/address.c index 43ab9216c..adbb0de83 100644 --- a/address/address.c +++ b/address/address.c @@ -29,7 +29,6 @@ */ #include "config.h" -#include #include #include #include diff --git a/address/address.h b/address/address.h index a9bd31f34..6c79bd320 100644 --- a/address/address.h +++ b/address/address.h @@ -26,7 +26,7 @@ #include #include -#include "mutt/queue.h" +#include "mutt/mutt.h" /** * struct Address - An email address diff --git a/address/group.c b/address/group.c index 0099f159b..799373eb5 100644 --- a/address/group.c +++ b/address/group.c @@ -32,8 +32,8 @@ #include #include #include -#include "address/lib.h" #include "group.h" +#include "address.h" static struct Hash *Groups = NULL; diff --git a/address/group.h b/address/group.h index b3fdcb5e1..7a5c27107 100644 --- a/address/group.h +++ b/address/group.h @@ -27,8 +27,7 @@ #include #include "mutt/mutt.h" - -struct Address; +#include "address.h" #define MUTT_GROUP 0 #define MUTT_UNGROUP 1 diff --git a/conn/socket.h b/conn/socket.h index e74cdd9c9..cbaf96899 100644 --- a/conn/socket.h +++ b/conn/socket.h @@ -26,7 +26,6 @@ #include #include -#include "mutt/mutt.h" /** * enum ConnectionType - Type of connection diff --git a/email/envelope.h b/email/envelope.h index 2d319c299..e2d652d6e 100644 --- a/email/envelope.h +++ b/email/envelope.h @@ -27,7 +27,7 @@ #include "config.h" #include #include "mutt/mutt.h" -#include "address/address.h" +#include "address/lib.h" #define MUTT_ENV_CHANGED_IRT (1<<0) ///< In-Reply-To changed to link/break threads #define MUTT_ENV_CHANGED_REFS (1<<1) ///< References changed to break thread diff --git a/email/parse.c b/email/parse.c index c5d3bc1d8..55046f0fe 100644 --- a/email/parse.c +++ b/email/parse.c @@ -30,8 +30,6 @@ #include "config.h" #include #include -#include -#include #include #include #include "mutt/mutt.h" diff --git a/email/parse.h b/email/parse.h index 6c5f1b39a..c6ddd4ab1 100644 --- a/email/parse.h +++ b/email/parse.h @@ -26,6 +26,7 @@ #include "config.h" #include #include +#include "mime.h" struct Body; struct Envelope; diff --git a/email/rfc2231.c b/email/rfc2231.c index 9dc576ed3..a409dc5d8 100644 --- a/email/rfc2231.c +++ b/email/rfc2231.c @@ -36,7 +36,6 @@ #include #include #include -#include #include #include #include "mutt/mutt.h" diff --git a/email/url.c b/email/url.c index f7ec6709c..042e8c8f8 100644 --- a/email/url.c +++ b/email/url.c @@ -28,7 +28,6 @@ #include "config.h" #include -#include #include #include "mutt/mutt.h" #include "url.h" diff --git a/hcache/serialize.c b/hcache/serialize.c index cec5f782f..c90162b5a 100644 --- a/hcache/serialize.c +++ b/hcache/serialize.c @@ -38,7 +38,6 @@ #include "mutt/mutt.h" #include "address/lib.h" #include "email/lib.h" -#include "globals.h" #include "hcache.h" /** diff --git a/imap/imap.c b/imap/imap.c index 78e29a9c5..2d8b52d52 100644 --- a/imap/imap.c +++ b/imap/imap.c @@ -48,7 +48,6 @@ #include "commands.h" #include "curs_lib.h" #include "globals.h" -#include "hcache/hcache.h" #include "hook.h" #include "mailbox.h" #include "message.h" diff --git a/imap/imap.h b/imap/imap.h index 0e730b494..7eb183e0e 100644 --- a/imap/imap.h +++ b/imap/imap.h @@ -54,12 +54,12 @@ #include "mx.h" struct BrowserState; +struct Buffer; struct ConnAccount; struct EmailList; struct Mailbox; -struct Pattern; -struct stat; struct PatternHead; +struct stat; /* These Config Variables are only used in imap/auth.c */ extern char *C_ImapAuthenticators; diff --git a/maildir/shared.c b/maildir/shared.c index 4c658962d..5fff8fe75 100644 --- a/maildir/shared.c +++ b/maildir/shared.c @@ -38,7 +38,6 @@ #include #include #include -#include #include #include #include @@ -53,6 +52,7 @@ #include "context.h" #include "copy.h" #include "globals.h" +#include "hcache/hcache.h" #include "lib.h" #include "mailbox.h" #include "mutt_thread.h" diff --git a/mutt/buffer.c b/mutt/buffer.c index 9b19b3f22..33f90eb98 100644 --- a/mutt/buffer.c +++ b/mutt/buffer.c @@ -33,7 +33,6 @@ #include #include #include "buffer.h" -#include "logging.h" #include "memory.h" #include "string2.h" diff --git a/mutt/file.c b/mutt/file.c index 26270b451..76bd9fe25 100644 --- a/mutt/file.c +++ b/mutt/file.c @@ -47,7 +47,6 @@ #include "memory.h" #include "message.h" #include "path.h" -#include "pool.h" #include "string2.h" char *C_Tmpdir; ///< Config: Directory for temporary files diff --git a/mutt/memory.c b/mutt/memory.c index b8ee0448c..d8fcbd8c8 100644 --- a/mutt/memory.c +++ b/mutt/memory.c @@ -30,7 +30,6 @@ */ #include "config.h" -#include #include #include "memory.h" #include "exit.h" diff --git a/mutt/notify.c b/mutt/notify.c index 777a5b837..7667f7c15 100644 --- a/mutt/notify.c +++ b/mutt/notify.c @@ -27,9 +27,12 @@ */ #include "config.h" +#include #include #include #include "notify.h" +#include "memory.h" +#include "queue.h" /** * struct Notify - Notification API diff --git a/mutt/notify.h b/mutt/notify.h index 30e10307b..f57f3a6ea 100644 --- a/mutt/notify.h +++ b/mutt/notify.h @@ -24,8 +24,9 @@ #define MUTT_LIB_NOTIFY_H #include -#include "observer.h" +#include #include "notify_type.h" +#include "observer.h" struct Notify; diff --git a/mutt/observer.h b/mutt/observer.h index 8b3f66f3a..00b6b98b8 100644 --- a/mutt/observer.h +++ b/mutt/observer.h @@ -31,10 +31,8 @@ #include #include -#include "mutt/mutt.h" #include "notify_type.h" - -struct Notify; +#include "queue.h" /** * struct NotifyCallback - Data passed to a notification function diff --git a/mutt/pool.c b/mutt/pool.c index ed4dd89cb..de6baae23 100644 --- a/mutt/pool.c +++ b/mutt/pool.c @@ -27,14 +27,10 @@ */ #include "config.h" -#include -#include #include -#include #include "buffer.h" #include "logging.h" #include "memory.h" -#include "string2.h" static size_t BufferPoolCount = 0; static size_t BufferPoolLen = 0; diff --git a/mutt/signal.c b/mutt/signal.c index f7bdf38b3..4ce5b8aef 100644 --- a/mutt/signal.c +++ b/mutt/signal.c @@ -33,7 +33,6 @@ #include #include #include -#include "curs_lib.h" #include "message.h" #include "signal2.h" #ifdef HAVE_LIBUNWIND diff --git a/mutt/string.c b/mutt/string.c index e322daf14..e841df7b4 100644 --- a/mutt/string.c +++ b/mutt/string.c @@ -42,6 +42,7 @@ #include "logging.h" #include "memory.h" #include "message.h" +#include "queue.h" #include "string2.h" #ifdef HAVE_SYSEXITS_H #include diff --git a/ncrypt/crypt.c b/ncrypt/crypt.c index e5ec97a92..cbc7061fb 100644 --- a/ncrypt/crypt.c +++ b/ncrypt/crypt.c @@ -38,7 +38,6 @@ #include #include #include -#include #include "mutt/mutt.h" #include "address/lib.h" #include "config/lib.h" diff --git a/ncrypt/crypt_gpgme.c b/ncrypt/crypt_gpgme.c index 2d45f040e..29f324ca5 100644 --- a/ncrypt/crypt_gpgme.c +++ b/ncrypt/crypt_gpgme.c @@ -71,6 +71,7 @@ #include "ncrypt.h" #include "opcodes.h" #include "options.h" +#include "pager.h" #include "protos.h" #include "recvattach.h" #include "sendlib.h" diff --git a/ncrypt/crypt_mod_pgp_gpgme.c b/ncrypt/crypt_mod_pgp_gpgme.c index 3521d0159..308890a5f 100644 --- a/ncrypt/crypt_mod_pgp_gpgme.c +++ b/ncrypt/crypt_mod_pgp_gpgme.c @@ -27,6 +27,7 @@ */ #include "config.h" +#include #include #include "crypt_gpgme.h" #include "crypt_mod.h" diff --git a/ncrypt/crypt_mod_smime_gpgme.c b/ncrypt/crypt_mod_smime_gpgme.c index afd7b7342..89907e266 100644 --- a/ncrypt/crypt_mod_smime_gpgme.c +++ b/ncrypt/crypt_mod_smime_gpgme.c @@ -27,6 +27,7 @@ */ #include "config.h" +#include #include #include "crypt_gpgme.h" #include "crypt_mod.h" diff --git a/ncrypt/cryptglue.c b/ncrypt/cryptglue.c index d36ab42c6..6b4d00af8 100644 --- a/ncrypt/cryptglue.c +++ b/ncrypt/cryptglue.c @@ -44,6 +44,7 @@ #include "ncrypt.h" struct Address; +struct AddressList; struct Body; struct Envelope; struct Email; diff --git a/ncrypt/ncrypt.h b/ncrypt/ncrypt.h index 779a6cc24..f39a429fe 100644 --- a/ncrypt/ncrypt.h +++ b/ncrypt/ncrypt.h @@ -55,7 +55,6 @@ #include struct Address; -struct AddressList; struct Body; struct Envelope; struct Email; diff --git a/ncrypt/pgpinvoke.c b/ncrypt/pgpinvoke.c index 0779cf8eb..30aebae93 100644 --- a/ncrypt/pgpinvoke.c +++ b/ncrypt/pgpinvoke.c @@ -31,13 +31,11 @@ #include "config.h" #include -#include #include #include #include #include "mutt/mutt.h" #include "address/lib.h" -#include "email/lib.h" #include "filter.h" #include "format_flags.h" #include "globals.h" diff --git a/ncrypt/pgpkey.c b/ncrypt/pgpkey.c index f5222b4aa..4767f73fa 100644 --- a/ncrypt/pgpkey.c +++ b/ncrypt/pgpkey.c @@ -37,7 +37,6 @@ #include #include #include -#include #include #include "mutt/mutt.h" #include "address/lib.h" @@ -59,6 +58,7 @@ #include "ncrypt.h" #include "opcodes.h" #include "options.h" +#include "pager.h" #include "pgpinvoke.h" #include "protos.h" #include "recvattach.h" diff --git a/pop/pop_auth.c b/pop/pop_auth.c index f0fd96260..8114278f9 100644 --- a/pop/pop_auth.c +++ b/pop/pop_auth.c @@ -34,7 +34,6 @@ #include "pop_private.h" #include "mutt/mutt.h" #include "address/lib.h" -#include "email/lib.h" #include "conn/conn.h" #include "mutt_account.h" #include "mutt_logging.h" -- 2.40.0