From: Jan Kratochvil Date: Fri, 21 Apr 2017 14:14:37 +0000 (+0200) Subject: release branch: Fix: --enable-werror X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0d4c07afb1e5e37e8e296858f8b14a3b4adf950b;p=binutils-gdb.git release branch: Fix: --enable-werror gdb-8.0-branch ./configure --enable-werror --enable-targets=all aarch64-tdep.c:3045:13: error: ‘void selftests::aarch64_process_record_test()’ declared ‘static’ but never defined [-Werror=unused-function] arm-tdep.c:9601:13: error: ‘void selftests::arm_record_test()’ declared ‘static’ but never defined [-Werror=unused-function] gdb/ChangeLog 2017-04-21 Jan Kratochvil * 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/ChangeLog b/gdb/ChangeLog index cb6db1fb783..b6576853df2 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2017-04-21 Jan Kratochvil + + * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if + GDB_SELF_TEST. + * arm-tdep.c (selftests::arm_record_test): Likewise. + 2017-04-21 Yao Qi * regcache.c (regcache_restore): Remove argument 2. Replace diff --git a/gdb/aarch64-tdep.c b/gdb/aarch64-tdep.c index 28c2573d18d..6113621e8dc 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 c8fabfb31ee..9ac667f990b 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 */