]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Remove old lint code
authorTom Tromey <tom@tromey.com>
Sun, 29 Jul 2018 21:23:51 +0000 (15:23 -0600)
committerTom Tromey <tom@tromey.com>
Mon, 30 Jul 2018 14:29:47 +0000 (08:29 -0600)
This removes dead code that, according to the comments, existed to
placate lint.  I don't think this has been relevant in a long time,
and certainly not since gdb switched to C++.

Tested by rebuilding.

ChangeLog
2018-07-30  Tom Tromey  <tom@tromey.com>

* cli/cli-decode.c (lookup_cmd): Remove lint code.
* value.c (unpack_long): Remove lint code.
* valops.c (value_ind): Remove lint code.
* valarith.c (value_x_binop, value_x_unop, value_equal)
(value_pos): Remove lint code.

gdb/ChangeLog
gdb/cli/cli-decode.c
gdb/valarith.c
gdb/valops.c
gdb/value.c

index 2c2763d03c1916be7aa8d849514e4db1500fbd72..2cd7d6498b0aa60ef583e9a8a93e24eb492e345a 100644 (file)
@@ -1,3 +1,11 @@
+2018-07-30  Tom Tromey  <tom@tromey.com>
+
+       * cli/cli-decode.c (lookup_cmd): Remove lint code.
+       * value.c (unpack_long): Remove lint code.
+       * valops.c (value_ind): Remove lint code.
+       * valarith.c (value_x_binop, value_x_unop, value_equal)
+       (value_pos): Remove lint code.
+
 2018-07-28  Tom de Vries  <tdevries@suse.de>
 
        * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
index c8dda700ca8f4ee47c8e71dc1dab060b37178f9a..83dd67efe3f64f3834692ebc4fba21d54440c4d3 100644 (file)
@@ -1561,7 +1561,6 @@ lookup_cmd (const char **line, struct cmd_list_element *list,
              }
          error (_("Ambiguous %scommand \"%s\": %s."), local_cmdtype,
                 *line, ambbuf);
-         return 0;             /* lint */
        }
     }
   else
index d2dd5900647473ece117d4ac9102a36363222ebf..01ca50d3d21429eb3ddec6f69cb2a94f6b5353d8 100644 (file)
@@ -504,9 +504,6 @@ value_x_binop (struct value *arg1, struct value *arg2, enum exp_opcode op,
     }
   throw_error (NOT_FOUND_ERROR,
                _("member function %s not found"), tstr);
-#ifdef lint
-  return call_function_by_hand (argvec[0], 2 - static_memfuncp, argvec + 1);
-#endif
 }
 
 /* We know that arg1 is a structure, so try to find a unary user
@@ -622,8 +619,6 @@ value_x_unop (struct value *arg1, enum exp_opcode op, enum noside noside)
     }
   throw_error (NOT_FOUND_ERROR,
                _("member function %s not found"), tstr);
-
-  return 0;                    /* For lint -- never reached */
 }
 \f
 
@@ -1533,10 +1528,7 @@ value_equal (struct value *arg1, struct value *arg2)
       return value_strcmp (arg1, arg2) == 0;
     }
   else
-    {
-      error (_("Invalid type combination in equality test."));
-      return 0;                        /* For lint -- never reached.  */
-    }
+    error (_("Invalid type combination in equality test."));
 }
 
 /* Compare values based on their raw contents.  Useful for arrays since
@@ -1628,10 +1620,7 @@ value_pos (struct value *arg1)
       || (TYPE_CODE (type) == TYPE_CODE_ARRAY && TYPE_VECTOR (type)))
     return value_from_contents (type, value_contents (arg1));
   else
-    {
-      error (_("Argument to positive operation not a number."));
-      return 0;                        /* For lint -- never reached.  */
-    }
+    error (_("Argument to positive operation not a number."));
 }
 
 struct value *
@@ -1663,10 +1652,7 @@ value_neg (struct value *arg1)
       return val;
     }
   else
-    {
-      error (_("Argument to negate operation not a number."));
-      return 0;                        /* For lint -- never reached.  */
-    }
+    error (_("Argument to negate operation not a number."));
 }
 
 struct value *
index 9bdbf22b03cdc055625eb71e6ad45955cea5973f..de6f839c33c921cf561cb860b73a3ce6962cf110 100644 (file)
@@ -1588,7 +1588,6 @@ value_ind (struct value *arg1)
     }
 
   error (_("Attempt to take contents of a non-pointer value."));
-  return 0;                    /* For lint -- never reached.  */
 }
 \f
 /* Create a value for an array by allocating space in GDB, copying the
index af635ba5bc324cd793050329da651345d30b4356..b0f22f1117ea0e61cacf6e03c4ab02534713e2af 100644 (file)
@@ -2777,7 +2777,6 @@ unpack_long (struct type *type, const gdb_byte *valaddr)
     default:
       error (_("Value can't be converted to integer."));
     }
-  return 0;                    /* Placate lint.  */
 }
 
 /* Unpack raw data (copied from debugee, target byte order) at VALADDR