[PATCH] gdb, testsuite: clean duplicate header includes
Klaus Gerlicher
klaus.gerlicher@intel.com
Thu Sep 12 07:17:28 GMT 2024
From: "Gerlicher, Klaus" <klaus.gerlicher@intel.com>
Some of the gdb and testsuite files double include some headers. While
all headers use include guards, it helps a bit keeping the code base
tidy.
No functional change.
---
gdb/cli/cli-cmds.c | 1 -
gdb/fbsd-tdep.c | 1 -
gdb/m2-typeprint.c | 1 -
gdb/ppc-netbsd-tdep.c | 1 -
gdb/stack.c | 1 -
gdb/testsuite/gdb.arch/sparc64-adi.c | 1 -
gdb/testsuite/gdb.base/reset-catchpoint-cond-lib.c | 1 -
gdb/testsuite/gdb.debuginfod/corefile-mapped-file-3.c | 1 -
gdb/testsuite/gdb.multi/multi-term-settings.c | 1 -
gdb/testsuite/gdb.server/exit-multiple-threads.c | 1 -
gdb/testsuite/gdb.threads/create-fail.c | 2 --
gdb/testsuite/gdb.threads/fork-thread-pending.c | 1 -
gdb/testsuite/gdb.threads/watchpoint-fork-mt.c | 1 -
gdb/valops.c | 1 -
14 files changed, 15 deletions(-)
diff --git a/gdb/cli/cli-cmds.c b/gdb/cli/cli-cmds.c
index fd8e27735f0..fd365d8680a 100644
--- a/gdb/cli/cli-cmds.c
+++ b/gdb/cli/cli-cmds.c
@@ -51,7 +51,6 @@
#include "cli/cli-cmds.h"
#include "cli/cli-style.h"
#include "cli/cli-utils.h"
-#include "cli/cli-style.h"
#include "extension.h"
#include "gdbsupport/pathstuff.h"
diff --git a/gdb/fbsd-tdep.c b/gdb/fbsd-tdep.c
index ac51f101d27..e97ff52d5bf 100644
--- a/gdb/fbsd-tdep.c
+++ b/gdb/fbsd-tdep.c
@@ -26,7 +26,6 @@
#include "regcache.h"
#include "regset.h"
#include "gdbthread.h"
-#include "objfiles.h"
#include "xml-syscall.h"
#include <sys/socket.h>
#include <arpa/inet.h>
diff --git a/gdb/m2-typeprint.c b/gdb/m2-typeprint.c
index c0ae72203c3..4ade1ce7e7a 100644
--- a/gdb/m2-typeprint.c
+++ b/gdb/m2-typeprint.c
@@ -27,7 +27,6 @@
#include "gdbcore.h"
#include "m2-lang.h"
#include "target.h"
-#include "language.h"
#include "demangle.h"
#include "c-lang.h"
#include "typeprint.h"
diff --git a/gdb/ppc-netbsd-tdep.c b/gdb/ppc-netbsd-tdep.c
index d8e4c424ba4..b412030ab9e 100644
--- a/gdb/ppc-netbsd-tdep.c
+++ b/gdb/ppc-netbsd-tdep.c
@@ -28,7 +28,6 @@
#include "ppc-tdep.h"
#include "netbsd-tdep.h"
-#include "ppc-tdep.h"
#include "solib-svr4.h"
/* Register offsets from <machine/reg.h>. */
diff --git a/gdb/stack.c b/gdb/stack.c
index b7a102eb2c3..7420780b5ed 100644
--- a/gdb/stack.c
+++ b/gdb/stack.c
@@ -50,7 +50,6 @@
#include "linespec.h"
#include "cli/cli-utils.h"
#include "objfiles.h"
-#include "annotate.h"
#include "symfile.h"
#include "extension.h"
diff --git a/gdb/testsuite/gdb.arch/sparc64-adi.c b/gdb/testsuite/gdb.arch/sparc64-adi.c
index aee5aca7fc0..97f6a99e546 100644
--- a/gdb/testsuite/gdb.arch/sparc64-adi.c
+++ b/gdb/testsuite/gdb.arch/sparc64-adi.c
@@ -31,7 +31,6 @@
#include <string.h>
#include <signal.h>
#include <sys/shm.h>
-#include <errno.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <fcntl.h>
diff --git a/gdb/testsuite/gdb.base/reset-catchpoint-cond-lib.c b/gdb/testsuite/gdb.base/reset-catchpoint-cond-lib.c
index 350c0c074d5..06f3c3dec11 100644
--- a/gdb/testsuite/gdb.base/reset-catchpoint-cond-lib.c
+++ b/gdb/testsuite/gdb.base/reset-catchpoint-cond-lib.c
@@ -20,7 +20,6 @@
#include <unistd.h>
#include <sys/types.h>
#include <sys/wait.h>
-#include <unistd.h>
#include <assert.h>
#include <stdlib.h>
diff --git a/gdb/testsuite/gdb.debuginfod/corefile-mapped-file-3.c b/gdb/testsuite/gdb.debuginfod/corefile-mapped-file-3.c
index 45d78336930..98ed9526f73 100644
--- a/gdb/testsuite/gdb.debuginfod/corefile-mapped-file-3.c
+++ b/gdb/testsuite/gdb.debuginfod/corefile-mapped-file-3.c
@@ -17,7 +17,6 @@
#include <sys/stat.h>
#include <fcntl.h>
#include <sys/types.h>
-#include <sys/stat.h>
#include <unistd.h>
#include <sys/mman.h>
diff --git a/gdb/testsuite/gdb.multi/multi-term-settings.c b/gdb/testsuite/gdb.multi/multi-term-settings.c
index 68802068893..e9e7e9592c8 100644
--- a/gdb/testsuite/gdb.multi/multi-term-settings.c
+++ b/gdb/testsuite/gdb.multi/multi-term-settings.c
@@ -22,7 +22,6 @@
#include <stdio.h>
#include <sys/types.h>
#include <termios.h>
-#include <unistd.h>
#include <signal.h>
int
diff --git a/gdb/testsuite/gdb.server/exit-multiple-threads.c b/gdb/testsuite/gdb.server/exit-multiple-threads.c
index 989f1f2de57..5bf0fc8ff36 100644
--- a/gdb/testsuite/gdb.server/exit-multiple-threads.c
+++ b/gdb/testsuite/gdb.server/exit-multiple-threads.c
@@ -20,7 +20,6 @@
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
-#include <pthread.h>
/* The number of threads to create. */
int thread_count = 3;
diff --git a/gdb/testsuite/gdb.threads/create-fail.c b/gdb/testsuite/gdb.threads/create-fail.c
index 01633e40117..e4cd27e0b9e 100644
--- a/gdb/testsuite/gdb.threads/create-fail.c
+++ b/gdb/testsuite/gdb.threads/create-fail.c
@@ -23,10 +23,8 @@
#include <errno.h>
#include <string.h>
#include <assert.h>
-#include <stdio.h>
#include <sys/types.h>
#include <dirent.h>
-#include <assert.h>
#include <unistd.h>
/* Count the number of tasks/threads in the PID thread group. */
diff --git a/gdb/testsuite/gdb.threads/fork-thread-pending.c b/gdb/testsuite/gdb.threads/fork-thread-pending.c
index 01dcc409932..a9b557aba49 100644
--- a/gdb/testsuite/gdb.threads/fork-thread-pending.c
+++ b/gdb/testsuite/gdb.threads/fork-thread-pending.c
@@ -21,7 +21,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
-#include <unistd.h>
#include <sys/types.h>
#include <sys/wait.h>
diff --git a/gdb/testsuite/gdb.threads/watchpoint-fork-mt.c b/gdb/testsuite/gdb.threads/watchpoint-fork-mt.c
index b74a841d85d..eb65d45b666 100644
--- a/gdb/testsuite/gdb.threads/watchpoint-fork-mt.c
+++ b/gdb/testsuite/gdb.threads/watchpoint-fork-mt.c
@@ -27,7 +27,6 @@
#include <pthread.h>
#include <asm/unistd.h>
-#include <unistd.h>
#define gettid() syscall (__NR_gettid)
/* Non-atomic `var++' should not hurt as we synchronize the threads by the STEP
diff --git a/gdb/valops.c b/gdb/valops.c
index 427fbb1ad61..8b3888fa63b 100644
--- a/gdb/valops.c
+++ b/gdb/valops.c
@@ -40,7 +40,6 @@
#include "observable.h"
#include "objfiles.h"
#include "extension.h"
-#include "gdbtypes.h"
#include "gdbsupport/byte-vector.h"
#include "typeprint.h"
--
2.34.1
Intel Deutschland GmbH
Registered Address: Am Campeon 10, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de
Managing Directors: Sean Fennelly, Jeffrey Schneiderman, Tiffany Doon Silva
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928
More information about the Gdb-patches
mailing list