]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - gas/config/tc-ns32k.c
-Wimplicit-fallthrough warning fixes
[thirdparty/binutils-gdb.git] / gas / config / tc-ns32k.c
index 2b88bf4462ce52acf813846717781d00abe143f9..570916db6e9fd659e4680d149decd79c439c5a6b 100644 (file)
@@ -132,7 +132,6 @@ struct int_ins_form
 
 struct int_ins_form iif;
 expressionS exprP;
-char *input_line_pointer;
 
 /* Description of the PARTs in IIF
   object[n]:
@@ -433,6 +432,7 @@ addr_mode (char *operand,
                  addrmodeP->disp[0] = str + 2;
                  return -1;
                }
+             /* Fall through.  */
            default:
              as_bad (_("Invalid syntax in PC-relative addressing mode"));
              return 0;
@@ -482,7 +482,7 @@ addr_mode (char *operand,
        {
        case 'f':
          addrmodeP->float_flag = 1;
-         /* Drop through.  */
+         /* Fall through.  */
        case 'r':
          if (str[1] >= '0' && str[1] < '8')
            {
@@ -565,7 +565,7 @@ addr_mode (char *operand,
                  str[strl - 4] = 0;
                  return -1;            /* reg rel */
                }
-             /* Drop through.  */
+             /* Fall through.  */
 
            default:
              if (!strncmp (&str[strl - 4], "(fp", 3))
@@ -878,7 +878,7 @@ bit_fix_new (int size,              /* Length of bitfield.  */
 {
   bit_fixS *bit_fixP;
 
-  bit_fixP = obstack_alloc (&notes, sizeof (bit_fixS));
+  bit_fixP = XOBNEW (&notes, bit_fixS);
 
   bit_fixP->fx_bit_size = size;
   bit_fixP->fx_bit_offset = offset;
@@ -926,6 +926,7 @@ encode_operand (int argc,
        case 'f':               /* Operand of sfsr turns out to be a nasty
                                   specialcase.  */
          opcode_bit_ptr -= 5;
+         /* Fall through.  */
        case 'Z':               /* Float not immediate.  */
        case 'F':               /* 32 bit float general form.  */
        case 'L':               /* 64 bit float.  */
@@ -1908,7 +1909,7 @@ md_begin (void)
     }
 
   /* Some private space please!  */
-  freeptr_static = (char *) malloc (PRIVATE_SIZE);
+  freeptr_static = XNEWVEC (char, PRIVATE_SIZE);
 }
 
 /* Turn the string pointed to by litP into a floating point constant
@@ -1916,7 +1917,7 @@ md_begin (void)
    LITTLENUMS emitted is stored in *SIZEP.  An error message is
    returned, or NULL on OK.  */
 
-char *
+const char *
 md_atof (int type, char *litP, int *sizeP)
 {
   return ieee_md_atof (type, litP, sizeP, FALSE);
@@ -2123,7 +2124,7 @@ struct option md_longopts[] =
 size_t md_longopts_size = sizeof (md_longopts);
 
 int
-md_parse_option (int c, char *arg)
+md_parse_option (int c, const char *arg)
 {
   switch (c)
     {
@@ -2228,8 +2229,8 @@ tc_gen_reloc (asection *section ATTRIBUTE_UNUSED, fixS *fixp)
 
   code = reloc (fixp->fx_size, fixp->fx_pcrel, fix_im_disp (fixp));
 
-  rel = xmalloc (sizeof (arelent));
-  rel->sym_ptr_ptr = xmalloc (sizeof (asymbol *));
+  rel = XNEW (arelent);
+  rel->sym_ptr_ptr = XNEW (asymbol *);
   *rel->sym_ptr_ptr = symbol_get_bfdsym (fixp->fx_addsy);
   rel->address = fixp->fx_frag->fr_address + fixp->fx_where;
   if (fixp->fx_pcrel)