diff options
author | Tom Tromey <tom@tromey.com> | 2018-07-29 15:23:51 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2018-07-30 08:29:47 -0600 |
commit | dba7455e76f87abe81cc9e4e9b1f979c1da02846 (patch) | |
tree | e7c272e7f1b5ab8c32fe07046e7c86652b90ad09 /gdb/valarith.c | |
parent | a05b9f5e1eb8f01eea23eff3902fa57f1f28a4e1 (diff) | |
download | gdb-dba7455e76f87abe81cc9e4e9b1f979c1da02846.zip gdb-dba7455e76f87abe81cc9e4e9b1f979c1da02846.tar.gz gdb-dba7455e76f87abe81cc9e4e9b1f979c1da02846.tar.bz2 |
Remove old lint code
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.
Diffstat (limited to 'gdb/valarith.c')
-rw-r--r-- | gdb/valarith.c | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/gdb/valarith.c b/gdb/valarith.c index d2dd590..01ca50d 100644 --- a/gdb/valarith.c +++ b/gdb/valarith.c @@ -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 */ } @@ -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 * |