This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[2/4] minor dwarf2read.c cleanup


This is just a minor cleanup I noticed while working on the next patch.

dwarf2_const_value_data has some parameters it does not use.
This patch removes them.

Tom

	* dwarf2read.c (dwarf2_const_value_data): Remove unused
	parameters.
	(dwarf2_const_value_attr): Update.
---
 gdb/dwarf2read.c | 15 +++++----------
 1 file changed, 5 insertions(+), 10 deletions(-)

diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index d846580..1acd6de 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -16338,8 +16338,7 @@ new_symbol (struct die_info *die, struct type *type, struct dwarf2_cu *cu)
    because that is the interpretation long in use by GCC.  */
 
 static gdb_byte *
-dwarf2_const_value_data (struct attribute *attr, struct type *type,
-			 const char *name, struct obstack *obstack,
+dwarf2_const_value_data (struct attribute *attr, struct obstack *obstack,
 			 struct dwarf2_cu *cu, LONGEST *value, int bits)
 {
   struct objfile *objfile = cu->objfile;
@@ -16441,20 +16440,16 @@ dwarf2_const_value_attr (struct attribute *attr, struct type *type,
 	 converted to host endianness, so we just need to sign- or
 	 zero-extend it as appropriate.  */
     case DW_FORM_data1:
-      *bytes = dwarf2_const_value_data (attr, type, name,
-					obstack, cu, value, 8);
+      *bytes = dwarf2_const_value_data (attr, obstack, cu, value, 8);
       break;
     case DW_FORM_data2:
-      *bytes = dwarf2_const_value_data (attr, type, name,
-					obstack, cu, value, 16);
+      *bytes = dwarf2_const_value_data (attr, obstack, cu, value, 16);
       break;
     case DW_FORM_data4:
-      *bytes = dwarf2_const_value_data (attr, type, name,
-					obstack, cu, value, 32);
+      *bytes = dwarf2_const_value_data (attr, obstack, cu, value, 32);
       break;
     case DW_FORM_data8:
-      *bytes = dwarf2_const_value_data (attr, type, name,
-					obstack, cu, value, 64);
+      *bytes = dwarf2_const_value_data (attr, obstack, cu, value, 64);
       break;
 
     case DW_FORM_sdata:
-- 
1.8.1.4


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]