gdb/gdb-release-werror.patch

75 lines
2.0 KiB
Diff
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

http://sourceware.org/ml/gdb-patches/2017-04/msg00593.html
Subject: [patch+8.0] release branch: Fix: --enable-werror
--8t9RHnE3ZwKMSgU+
Content-Type: text/plain; charset=iso-2022-jp
Content-Disposition: inline
Hi,
gdb-8.0-branch
./configure --enable-werror --enable-targets=all
aarch64-tdep.c:3045:13: error: $B!F(Bvoid selftests::aarch64_process_record_test()$B!G(B declared $B!F(Bstatic$B!G(B but never defined [-Werror=unused-function]
arm-tdep.c:9601:13: error: $B!F(Bvoid selftests::arm_record_test()$B!G(B declared $B!F(Bstatic$B!G(B but never defined [-Werror=unused-function]
OK for check-in?
Please do not tell me release branches do not support --enable-werror as this
is due to a sourcebase bug, not due to some unexpected compiler
incompatibility.
Sergio: Shouldn't it be also buildbot-tested?
Jan
--8t9RHnE3ZwKMSgU+
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline; filename=1
gdb/ChangeLog
2017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
* aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
GDB_SELF_TEST.
* arm-tdep.c (selftests::arm_record_test): Likewise.
diff --git a/gdb/aarch64-tdep.c b/gdb/aarch64-tdep.c
index 28c2573..6113621 100644
--- a/gdb/aarch64-tdep.c
+++ b/gdb/aarch64-tdep.c
@@ -3040,10 +3040,12 @@ aarch64_dump_tdep (struct gdbarch *gdbarch, struct ui_file *file)
paddress (gdbarch, tdep->lowest_pc));
}
+#if GDB_SELF_TEST
namespace selftests
{
static void aarch64_process_record_test (void);
}
+#endif
/* Suppress warning from -Wmissing-prototypes. */
extern initialize_file_ftype _initialize_aarch64_tdep;
diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c
index c8fabfb..9ac667f 100644
--- a/gdb/arm-tdep.c
+++ b/gdb/arm-tdep.c
@@ -9596,10 +9596,12 @@ arm_dump_tdep (struct gdbarch *gdbarch, struct ui_file *file)
(unsigned long) tdep->lowest_pc);
}
+#if GDB_SELF_TEST
namespace selftests
{
static void arm_record_test (void);
}
+#endif
extern initialize_file_ftype _initialize_arm_tdep; /* -Wmissing-prototypes */
--8t9RHnE3ZwKMSgU+--