[RFA,v2,10/13] Remove unused declaration from value.c

Message ID 20180721184720.3263-11-tom@tromey.com
State New, archived
Headers

Commit Message

Tom Tromey July 21, 2018, 6:47 p.m. UTC
  This removes an unused declaration from value_fetch_lazy_bitfield.
Because it is not completely clear if the check_typedef call is needed
somewhere beneath this function, this is broken out into a separate
patch.

gdb/ChangeLog
2018-07-21  Tom Tromey  <tom@tromey.com>

	* value.c (value_fetch_lazy_bitfield): Remove unused variable.
---
 gdb/ChangeLog | 4 ++++
 gdb/value.c   | 1 -
 2 files changed, 4 insertions(+), 1 deletion(-)
  

Comments

Simon Marchi July 22, 2018, 2:13 a.m. UTC | #1
On 2018-07-21 02:47 PM, Tom Tromey wrote:
> This removes an unused declaration from value_fetch_lazy_bitfield.
> Because it is not completely clear if the check_typedef call is needed
> somewhere beneath this function, this is broken out into a separate
> patch.
> 
> gdb/ChangeLog
> 2018-07-21  Tom Tromey  <tom@tromey.com>
> 
> 	* value.c (value_fetch_lazy_bitfield): Remove unused variable.
> ---
>  gdb/ChangeLog | 4 ++++
>  gdb/value.c   | 1 -
>  2 files changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/gdb/value.c b/gdb/value.c
> index 9f9e78ece2b..af635ba5bc3 100644
> --- a/gdb/value.c
> +++ b/gdb/value.c
> @@ -3726,7 +3726,6 @@ value_fetch_lazy_bitfield (struct value *val)
>       per bitfield.  It would be even better to read only the containing
>       word, but we have no way to record that just specific bits of a
>       value have been fetched.  */
> -  struct type *type = check_typedef (value_type (val));
>    struct value *parent = value_parent (val);
>  
>    if (value_lazy (parent))
> 

LGTM, as discussed in v1:

https://sourceware.org/ml/gdb-patches/2018-07/msg00359.html

Simon
  

Patch

diff --git a/gdb/value.c b/gdb/value.c
index 9f9e78ece2b..af635ba5bc3 100644
--- a/gdb/value.c
+++ b/gdb/value.c
@@ -3726,7 +3726,6 @@  value_fetch_lazy_bitfield (struct value *val)
      per bitfield.  It would be even better to read only the containing
      word, but we have no way to record that just specific bits of a
      value have been fetched.  */
-  struct type *type = check_typedef (value_type (val));
   struct value *parent = value_parent (val);
 
   if (value_lazy (parent))