-Wimplicit-fallthrough error fixes
[deliverable/binutils-gdb.git] / gas / config / tc-i960.c
index 45e8a44e58624fc0e02d7c55b7d0a3afadb34f27..5afbb6f313c2d3c03e10c90e68ac872af30b39fc 100644 (file)
@@ -577,6 +577,7 @@ get_cdisp (const char *dispP, /* Displacement as specified in source instruction
     {
     case O_illegal:
       as_bad (_("expression syntax error"));
+      break;
 
     case O_symbol:
       if (S_GET_SEGMENT (e.X_add_symbol) == now_seg
@@ -1246,7 +1247,7 @@ parse_ldconst (char *arg[])       /* See above.  */
     {
     default:
       /* We're dependent on one or more symbols -- use "lda".  */
-      arg[0] = "lda";
+      arg[0] = (char *) "lda";
       break;
 
     case O_constant:
@@ -1263,26 +1264,26 @@ parse_ldconst (char *arg[])     /* See above.  */
                 lda xxx,<reg>.  */
       n = offs (e);
       if ((0 <= n) && (n <= 31))
-       arg[0] = "mov";
+       arg[0] = (char *) "mov";
       else if ((-31 <= n) && (n <= -1))
        {
-         arg[0] = "subo";
+         arg[0] = (char *) "subo";
          arg[3] = arg[2];
          sprintf (buf, "%d", -n);
          arg[1] = buf;
-         arg[2] = "0";
+         arg[2] = (char *) "0";
        }
       else if ((32 <= n) && (n <= 62))
        {
-         arg[0] = "addo";
+         arg[0] = (char *) "addo";
          arg[3] = arg[2];
-         arg[1] = "31";
+         arg[1] = (char *) "31";
          sprintf (buf, "%d", n - 31);
          arg[2] = buf;
        }
       else if ((shift = shift_ok (n)) != 0)
        {
-         arg[0] = "shlo";
+         arg[0] = (char *) "shlo";
          arg[3] = arg[2];
          sprintf (buf, "%d", shift);
          arg[1] = buf;
@@ -1290,7 +1291,7 @@ parse_ldconst (char *arg[])       /* See above.  */
          arg[2] = buf2;
        }
       else
-       arg[0] = "lda";
+       arg[0] = (char *) "lda";
       break;
 
     case O_illegal:
@@ -1707,7 +1708,7 @@ md_number_to_chars (char *buf,
   number_to_chars_littleendian (buf, value, n);
 }
 
-char *
+const char *
 md_atof (int type, char *litP, int *sizeP)
 {
   return ieee_md_atof (type, litP, sizeP, FALSE);
@@ -2623,7 +2624,7 @@ tc_gen_reloc (asection *section ATTRIBUTE_UNUSED, fixS *fixP)
 {
   arelent * reloc;
 
-  reloc = xmalloc (sizeof (arelent));
+  reloc = XNEW (arelent);
 
   /* HACK: Is this right?  */
   fixP->fx_r_type = tc_bfd_fix2rtype (fixP);
@@ -2640,7 +2641,7 @@ tc_gen_reloc (asection *section ATTRIBUTE_UNUSED, fixS *fixP)
 
   gas_assert (!fixP->fx_pcrel == !reloc->howto->pc_relative);
 
-  reloc->sym_ptr_ptr = xmalloc (sizeof (asymbol *));
+  reloc->sym_ptr_ptr = XNEW (asymbol *);
   *reloc->sym_ptr_ptr = symbol_get_bfdsym (fixP->fx_addsy);
   reloc->address = fixP->fx_frag->fr_address + fixP->fx_where;
   reloc->addend = fixP->fx_addnumber;
This page took 0.025251 seconds and 4 git commands to generate.