[gdb/build] Fix build with gcc 4.8.5
[binutils-gdb.git] / gdb / sparc64-tdep.c
index 95d46c83253b15e56fcf5548f762b07b26b16e80..5ca5f2dca8c71c0b4e69781d02001b1864d71ced 100644 (file)
@@ -327,8 +327,8 @@ adi_is_addr_mapped (CORE_ADDR vaddr, size_t cnt)
            }
        }
       }
-    else
-      warning (_("unable to open /proc file '%s'"), filename);
+  else
+    warning (_("unable to open /proc file '%s'"), filename);
 
   return false;
 }
@@ -389,19 +389,19 @@ adi_print_versions (CORE_ADDR vaddr, size_t cnt, gdb_byte *tags)
   while (cnt > 0)
     {
       QUIT;
-      printf_filtered ("%s:\t",
-                      paddress (target_gdbarch (), vaddr * adi_stat.blksize));
+      gdb_printf ("%s:\t",
+                 paddress (target_gdbarch (), vaddr * adi_stat.blksize));
       for (int i = maxelts; i > 0 && cnt > 0; i--, cnt--)
        {
          if (tags[v_idx] == 0xff)    /* no version tag */
-           printf_filtered ("-");
+           gdb_printf ("-");
          else
-           printf_filtered ("%1X", tags[v_idx]);
+           gdb_printf ("%1X", tags[v_idx]);
          if (cnt > 1)
-           printf_filtered (" ");
+           gdb_printf (" ");
          ++v_idx;
        }
-      printf_filtered ("\n");
+      gdb_printf ("\n");
       vaddr += maxelts;
     }
 }
@@ -648,7 +648,7 @@ sparc64_structure_or_union_p (const struct type *type)
 static struct type *
 sparc64_pstate_type (struct gdbarch *gdbarch)
 {
-  sparc_gdbarch_tdep *tdep = (sparc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+  sparc_gdbarch_tdep *tdep = gdbarch_tdep<sparc_gdbarch_tdep> (gdbarch);
 
   if (!tdep->sparc64_pstate_type)
     {
@@ -675,7 +675,7 @@ sparc64_pstate_type (struct gdbarch *gdbarch)
 static struct type *
 sparc64_ccr_type (struct gdbarch *gdbarch)
 {
-  sparc_gdbarch_tdep *tdep = (sparc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+  sparc_gdbarch_tdep *tdep = gdbarch_tdep<sparc_gdbarch_tdep> (gdbarch);
 
   if (tdep->sparc64_ccr_type == NULL)
     {
@@ -700,7 +700,7 @@ sparc64_ccr_type (struct gdbarch *gdbarch)
 static struct type *
 sparc64_fsr_type (struct gdbarch *gdbarch)
 {
-  sparc_gdbarch_tdep *tdep = (sparc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+  sparc_gdbarch_tdep *tdep = gdbarch_tdep<sparc_gdbarch_tdep> (gdbarch);
 
   if (!tdep->sparc64_fsr_type)
     {
@@ -733,7 +733,7 @@ sparc64_fsr_type (struct gdbarch *gdbarch)
 static struct type *
 sparc64_fprs_type (struct gdbarch *gdbarch)
 {
-  sparc_gdbarch_tdep *tdep = (sparc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+  sparc_gdbarch_tdep *tdep = gdbarch_tdep<sparc_gdbarch_tdep> (gdbarch);
 
   if (!tdep->sparc64_fprs_type)
     {
@@ -1806,7 +1806,7 @@ sparc64_addr_bits_remove (struct gdbarch *gdbarch, CORE_ADDR addr)
 void
 sparc64_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
 {
-  sparc_gdbarch_tdep *tdep = (sparc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+  sparc_gdbarch_tdep *tdep = gdbarch_tdep<sparc_gdbarch_tdep> (gdbarch);
 
   tdep->pc_regnum = SPARC64_PC_REGNUM;
   tdep->npc_regnum = SPARC64_NPC_REGNUM;