release branch: Fix: --enable-werror
authorJan Kratochvil <jan.kratochvil@redhat.com>
Fri, 21 Apr 2017 14:14:37 +0000 (16:14 +0200)
committerJan Kratochvil <jan.kratochvil@redhat.com>
Fri, 21 Apr 2017 14:14:37 +0000 (16:14 +0200)
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  <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.

gdb/ChangeLog
gdb/aarch64-tdep.c
gdb/arm-tdep.c

index cb6db1fb78378988b5039879b327fd7e1e981282..b6576853df2784cef8ce8a6bc4ceec201de92988 100644 (file)
@@ -1,3 +1,9 @@
+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.
+
 2017-04-21  Yao Qi  <yao.qi@linaro.org>
 
        * regcache.c (regcache_restore): Remove argument 2.  Replace
index 28c2573d18d23a41e863875d0fdf4472767df6b8..6113621e8dc115a930087c0474fb694574503b17 100644 (file)
@@ -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;
index c8fabfb31ee7a8b68bc790c11696915ba1f2d26c..9ac667f990bb1bd7628fc254e09f798eb9831d16 100644 (file)
@@ -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 */