From patchwork Wed Jun 24 13:24:55 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gary Benson X-Patchwork-Id: 7320 Received: (qmail 123419 invoked by alias); 24 Jun 2015 13:25:03 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 123410 invoked by uid 89); 24 Jun 2015 13:25:02 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=AWL, BAYES_00, KAM_LAZY_DOMAIN_SECURITY, RP_MATCHES_RCVD, SPF_HELO_PASS, URIBL_SBL autolearn=no version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 24 Jun 2015 13:24:59 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (Postfix) with ESMTPS id 91214B5E8F for ; Wed, 24 Jun 2015 13:24:58 +0000 (UTC) Received: from blade.nx (ovpn-116-95.ams2.redhat.com [10.36.116.95]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t5ODOvkE018790 for ; Wed, 24 Jun 2015 09:24:58 -0400 Received: from blade.nx (localhost [127.0.0.1]) by blade.nx (Postfix) with ESMTP id 39A452642D0 for ; Wed, 24 Jun 2015 14:24:55 +0100 (BST) From: Gary Benson To: gdb-patches@sourceware.org Subject: [OB PATCH] Remove redundant include directives. Date: Wed, 24 Jun 2015 14:24:55 +0100 Message-Id: <1435152295-26213-1-git-send-email-gbenson@redhat.com> X-IsSubscribed: yes Hi all, stdint.h was added to common-defs.h some months ago and should no longer be included directly by any file. gdb_assert.h was added to common-defs.h nearly a year ago, but three includes have crept in since then. This commit removes all such redundant include directives. Pushed as obvious. Cheers, Gary --- gdb/ChangeLog: * common/buffer.c (stdint.h): Do not include. * common/print-utils.c (stdint.h): Likewise. * compile/compile-c-symbols.c (gdb_assert.h): Likewise. * compile/compile-c-types.c (gdb_assert.h): Likewise. * ft32-tdep.c (gdb_assert.h): Likewise. * guile/scm-utils.c (stdint.h): Likewise. * i386-linux-tdep.c (stdint.h): Likewise. * i386-tdep.c (stdint.h): Likewise. * nat/linux-btrace.c (stdint.h): Likewise. * nat/linux-btrace.h (stdint.h): Likewise. * nat/linux-ptrace.c (stdint.h): Likewise. * nat/mips-linux-watch.h (stdint.h): Likewise. * ppc-linux-nat.c (stdint.h): Likewise. * python/python-internal.h (stdint.h): Likewise. * stub-termcap.c (stdlib.h): Likewise. * target/target.h (stdint.h): Likewise. * xtensa-linux-nat.c (stdint.h): Likewise. gdb/gdbserver/ChangeLog: * linux-i386-ipa.c (stdint.h): Do not include. * lynx-i386-low.c (stdint.h): Likewise. * lynx-ppc-low.c (stdint.h): Likewise. * mem-break.c (stdint.h): Likewise. * thread-db.c (stdint.h): Likewise. * tracepoint.c (stdint.h): Likewise. * win32-low.c (stdint.h): Likewise. --- gdb/ChangeLog | 20 ++++++++++++++++++++ gdb/common/buffer.c | 2 -- gdb/common/print-utils.c | 2 -- gdb/compile/compile-c-symbols.c | 1 - gdb/compile/compile-c-types.c | 2 -- gdb/ft32-tdep.c | 2 -- gdb/gdbserver/ChangeLog | 10 ++++++++++ gdb/gdbserver/linux-i386-ipa.c | 1 - gdb/gdbserver/lynx-i386-low.c | 2 -- gdb/gdbserver/lynx-ppc-low.c | 2 -- gdb/gdbserver/mem-break.c | 2 -- gdb/gdbserver/thread-db.c | 2 -- gdb/gdbserver/tracepoint.c | 2 -- gdb/gdbserver/win32-low.c | 2 -- gdb/guile/scm-utils.c | 1 - gdb/i386-linux-tdep.c | 2 -- gdb/i386-tdep.c | 2 -- gdb/nat/linux-btrace.c | 2 -- gdb/nat/linux-btrace.h | 2 -- gdb/nat/linux-ptrace.c | 2 -- gdb/nat/mips-linux-watch.h | 2 -- gdb/ppc-linux-nat.c | 2 -- gdb/python/python-internal.h | 2 -- gdb/stub-termcap.c | 2 -- gdb/target/target.h | 2 -- gdb/xtensa-linux-nat.c | 2 -- 26 files changed, 30 insertions(+), 45 deletions(-) diff --git a/gdb/common/buffer.c b/gdb/common/buffer.c index 28b2625..ca1636d 100644 --- a/gdb/common/buffer.c +++ b/gdb/common/buffer.c @@ -21,8 +21,6 @@ #include "xml-utils.h" #include "buffer.h" #include "inttypes.h" -#include - void buffer_grow (struct buffer *buffer, const char *data, size_t size) { diff --git a/gdb/common/print-utils.c b/gdb/common/print-utils.c index c8ff133..1c1a5c1 100644 --- a/gdb/common/print-utils.c +++ b/gdb/common/print-utils.c @@ -19,8 +19,6 @@ #include "common-defs.h" #include "print-utils.h" -#include - /* Temporary storage using circular buffer. */ #define NUMCELLS 16 diff --git a/gdb/compile/compile-c-symbols.c b/gdb/compile/compile-c-symbols.c index 455114c..68d38ba 100644 --- a/gdb/compile/compile-c-symbols.c +++ b/gdb/compile/compile-c-symbols.c @@ -20,7 +20,6 @@ #include "defs.h" #include "compile-internal.h" -#include "gdb_assert.h" #include "symtab.h" #include "parser-defs.h" #include "block.h" diff --git a/gdb/compile/compile-c-types.c b/gdb/compile/compile-c-types.c index 2b521bc..22f5a9d 100644 --- a/gdb/compile/compile-c-types.c +++ b/gdb/compile/compile-c-types.c @@ -21,8 +21,6 @@ #include "defs.h" #include "gdbtypes.h" #include "compile-internal.h" -#include "gdb_assert.h" - /* An object that maps a gdb type to a gcc type. */ struct type_map_instance diff --git a/gdb/ft32-tdep.c b/gdb/ft32-tdep.c index 41a7191..e7f4d1a 100644 --- a/gdb/ft32-tdep.c +++ b/gdb/ft32-tdep.c @@ -37,8 +37,6 @@ #include "dis-asm.h" #include "record.h" -#include "gdb_assert.h" - #include "ft32-tdep.h" #include "gdb/sim-ft32.h" diff --git a/gdb/gdbserver/linux-i386-ipa.c b/gdb/gdbserver/linux-i386-ipa.c index eb30dcd..de8d394 100644 --- a/gdb/gdbserver/linux-i386-ipa.c +++ b/gdb/gdbserver/linux-i386-ipa.c @@ -19,7 +19,6 @@ along with this program. If not, see . */ #include "server.h" -#include #include #include "tracepoint.h" diff --git a/gdb/gdbserver/lynx-i386-low.c b/gdb/gdbserver/lynx-i386-low.c index bd588c6..6b5a224 100644 --- a/gdb/gdbserver/lynx-i386-low.c +++ b/gdb/gdbserver/lynx-i386-low.c @@ -17,8 +17,6 @@ #include "server.h" #include "lynx-low.h" - -#include #include #include diff --git a/gdb/gdbserver/lynx-ppc-low.c b/gdb/gdbserver/lynx-ppc-low.c index 51d450f..0f31eaf 100644 --- a/gdb/gdbserver/lynx-ppc-low.c +++ b/gdb/gdbserver/lynx-ppc-low.c @@ -17,8 +17,6 @@ #include "server.h" #include "lynx-low.h" - -#include #include #include diff --git a/gdb/gdbserver/mem-break.c b/gdb/gdbserver/mem-break.c index d1b66bf..4eaa52b 100644 --- a/gdb/gdbserver/mem-break.c +++ b/gdb/gdbserver/mem-break.c @@ -21,8 +21,6 @@ #include "server.h" #include "regcache.h" #include "ax.h" -#include - const unsigned char *breakpoint_data; int breakpoint_len; diff --git a/gdb/gdbserver/thread-db.c b/gdb/gdbserver/thread-db.c index 5bf808e..4288fdb 100644 --- a/gdb/gdbserver/thread-db.c +++ b/gdb/gdbserver/thread-db.c @@ -34,8 +34,6 @@ static int thread_db_use_events; #ifndef USE_LIBTHREAD_DB_DIRECTLY #include #endif - -#include #include #include diff --git a/gdb/gdbserver/tracepoint.c b/gdb/gdbserver/tracepoint.c index 3ce9580..b5f252a 100644 --- a/gdb/gdbserver/tracepoint.c +++ b/gdb/gdbserver/tracepoint.c @@ -27,8 +27,6 @@ #include #include #include -#include - #include "ax.h" #include "tdesc.h" diff --git a/gdb/gdbserver/win32-low.c b/gdb/gdbserver/win32-low.c index 699115c..64caf24 100644 --- a/gdb/gdbserver/win32-low.c +++ b/gdb/gdbserver/win32-low.c @@ -26,8 +26,6 @@ #include "gdbthread.h" #include "dll.h" #include "hostio.h" - -#include #include #include #include diff --git a/gdb/guile/scm-utils.c b/gdb/guile/scm-utils.c index 59d8b52..07401e6 100644 --- a/gdb/guile/scm-utils.c +++ b/gdb/guile/scm-utils.c @@ -21,7 +21,6 @@ conventions, et.al. */ #include "defs.h" -#include #include "guile-internal.h" /* Define VARIABLES in the gdb module. */ diff --git a/gdb/i386-linux-tdep.c b/gdb/i386-linux-tdep.c index 061ad3a..7c2e322 100644 --- a/gdb/i386-linux-tdep.c +++ b/gdb/i386-linux-tdep.c @@ -44,8 +44,6 @@ #include "record-full.h" #include "linux-record.h" -#include - #include "features/i386/i386-linux.c" #include "features/i386/i386-mmx-linux.c" #include "features/i386/i386-mpx-linux.c" diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c index 42d0346..85e433e 100644 --- a/gdb/i386-tdep.c +++ b/gdb/i386-tdep.c @@ -50,8 +50,6 @@ #include "record.h" #include "record-full.h" -#include - #include "features/i386/i386.c" #include "features/i386/i386-avx.c" #include "features/i386/i386-mpx.c" diff --git a/gdb/nat/linux-btrace.c b/gdb/nat/linux-btrace.c index e7aff5e..cd7f3d1 100644 --- a/gdb/nat/linux-btrace.c +++ b/gdb/nat/linux-btrace.c @@ -30,8 +30,6 @@ #endif #if HAVE_LINUX_PERF_EVENT_H && defined(SYS_perf_event_open) - -#include #include #include #include diff --git a/gdb/nat/linux-btrace.h b/gdb/nat/linux-btrace.h index 12cdcde..bb4a8c5 100644 --- a/gdb/nat/linux-btrace.h +++ b/gdb/nat/linux-btrace.h @@ -24,8 +24,6 @@ #include "btrace-common.h" #include "vec.h" -#include - #if HAVE_LINUX_PERF_EVENT_H # include #endif diff --git a/gdb/nat/linux-ptrace.c b/gdb/nat/linux-ptrace.c index fb12606..1a926f9 100644 --- a/gdb/nat/linux-ptrace.c +++ b/gdb/nat/linux-ptrace.c @@ -23,8 +23,6 @@ #include "buffer.h" #include "gdb_wait.h" -#include - /* Stores the ptrace options supported by the running kernel. A value of -1 means we did not check for features yet. A value of 0 means there are no supported features. */ diff --git a/gdb/nat/mips-linux-watch.h b/gdb/nat/mips-linux-watch.h index 571cde4..10ed6ba 100644 --- a/gdb/nat/mips-linux-watch.h +++ b/gdb/nat/mips-linux-watch.h @@ -19,8 +19,6 @@ #define MIPS_LINUX_WATCH_H 1 #include -#include - #include "break-common.h" #define MAX_DEBUG_REGISTER 8 diff --git a/gdb/ppc-linux-nat.c b/gdb/ppc-linux-nat.c index 88ca49e..4ed03d0 100644 --- a/gdb/ppc-linux-nat.c +++ b/gdb/ppc-linux-nat.c @@ -26,8 +26,6 @@ #include "regcache.h" #include "target.h" #include "linux-nat.h" - -#include #include #include #include diff --git a/gdb/python/python-internal.h b/gdb/python/python-internal.h index f881559..ee949b7 100644 --- a/gdb/python/python-internal.h +++ b/gdb/python/python-internal.h @@ -65,8 +65,6 @@ /* Python 2.4 doesn't include stdint.h soon enough to get {u,}intptr_t needed by pyport.h. */ -#include - /* /usr/include/features.h on linux systems will define _POSIX_C_SOURCE if it sees _GNU_SOURCE (which config.h will define). pyconfig.h defines _POSIX_C_SOURCE to a different value than diff --git a/gdb/stub-termcap.c b/gdb/stub-termcap.c index 722929f..2ee1c04 100644 --- a/gdb/stub-termcap.c +++ b/gdb/stub-termcap.c @@ -22,8 +22,6 @@ #include "defs.h" -#include - #ifdef __cplusplus extern "C" { #endif diff --git a/gdb/target/target.h b/gdb/target/target.h index 05ac758..6ee0fee 100644 --- a/gdb/target/target.h +++ b/gdb/target/target.h @@ -21,8 +21,6 @@ #define TARGET_COMMON_H #include "target/waitstatus.h" -#include - /* This header is a stopgap until more code is shared. */ /* Read LEN bytes of target memory at address MEMADDR, placing the diff --git a/gdb/xtensa-linux-nat.c b/gdb/xtensa-linux-nat.c index 921bc99..fa62732 100644 --- a/gdb/xtensa-linux-nat.c +++ b/gdb/xtensa-linux-nat.c @@ -24,8 +24,6 @@ #include "regcache.h" #include "target.h" #include "linux-nat.h" - -#include #include #include #include