This is the mail archive of the mailing list for the Archer 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]

[expr-cumulative] Fix return type qualifier

Hi Sami,

OK to check-in?

errors due to -Werror on:
gdb/dwarf2read.c:3642: warning: type qualifiers ignored on function return type
from code of


	* dwarf2read.c (dwarf2_read_decl_line): Fix excessive const return
	qualifier.  Fix GNU formatting style.

--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -3357,14 +3357,17 @@ dwarf2_full_name (struct die_info *die, struct dwarf2_cu *cu)
   return name;
-/* read the given die's decl_line number. Return -1 if in case of an error */
-static const int dwarf2_read_decl_line (struct die_info *die, struct dwarf2_cu *cu){
+/* Read the given DIE's DW_AT_decl_line number.  Return -1 if in case of an
+   error.  */
+static int
+dwarf2_read_decl_line (struct die_info *die, struct dwarf2_cu *cu)
   struct attribute *line_attr;
   line_attr = dwarf2_attr (die, DW_AT_decl_line, cu);
-  if (line_attr){
-    return  DW_UNSND (line_attr);
-  }
+  if (line_attr)
+    return DW_UNSND (line_attr);
   return -1;

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