Patchwork [22/36] Remove duplicate const

login
register
mail settings
Submitter Pedro Alves
Date Feb. 9, 2015, 11:20 p.m.
Message ID <1423524046-20605-23-git-send-email-palves@redhat.com>
Download mbox | patch
Permalink /patch/4996/
State New
Headers show

Comments

Pedro Alves - Feb. 9, 2015, 11:20 p.m.
Building --enable-targets=all in C++ mode fails with:

  gdb/sparc-sol2-tdep.c:179:7: error: duplicate ‘const’
  gdb/arm-tdep.c:13878:33: error: duplicate ‘const’
  gdb/arm-tdep.c:13891:33: error: duplicate ‘const’

2014-10-22  Pedro Alves  <palves@redhat.com>

	* arm-tdep.c (decode_insn) <arm_handle_insn, thumb_handle_insn>:
	Remove duplicate const.
	* sparc-sol2-tdep.c (sparc_sol2_static_transform_name): Remove
	duplicate const.
---
 gdb/arm-tdep.c        | 4 ++--
 gdb/sparc-sol2-tdep.c | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

Patch

diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c
index 49b4c07..ce6cba2 100644
--- a/gdb/arm-tdep.c
+++ b/gdb/arm-tdep.c
@@ -13794,7 +13794,7 @@  decode_insn (insn_decode_record *arm_record, record_type_t record_type,
 {
 
   /* (Starting from numerical 0); bits 25, 26, 27 decodes type of arm instruction.  */
-  static const sti_arm_hdl_fp_t const arm_handle_insn[8] =                    
+  static const sti_arm_hdl_fp_t arm_handle_insn[8] =
   {
     arm_record_data_proc_misc_ld_str,   /* 000.  */
     arm_record_data_proc_imm,           /* 001.  */
@@ -13807,7 +13807,7 @@  decode_insn (insn_decode_record *arm_record, record_type_t record_type,
   };
 
   /* (Starting from numerical 0); bits 13,14,15 decodes type of thumb instruction.  */
-  static const sti_arm_hdl_fp_t const thumb_handle_insn[8] =
+  static const sti_arm_hdl_fp_t thumb_handle_insn[8] =
   { \
     thumb_record_shift_add_sub,        /* 000.  */
     thumb_record_add_sub_cmp_mov,      /* 001.  */
diff --git a/gdb/sparc-sol2-tdep.c b/gdb/sparc-sol2-tdep.c
index db297bd..1aabe76 100644
--- a/gdb/sparc-sol2-tdep.c
+++ b/gdb/sparc-sol2-tdep.c
@@ -223,7 +223,7 @@  static const struct frame_unwind sparc32_sol2_sigtramp_frame_unwind =
 
 /* Unglobalize NAME.  */
 
-const const char *
+const char *
 sparc_sol2_static_transform_name (const char *name)
 {
   /* The Sun compilers (Sun ONE Studio, Forte Developer, Sun WorkShop,