From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26891 invoked by alias); 23 Oct 2009 19:46:29 -0000 Mailing-List: contact archer-help@sourceware.org; run by ezmlm Sender: Precedence: bulk List-Post: List-Help: List-Subscribe: List-Id: Received: (qmail 26576 invoked by uid 22791); 23 Oct 2009 19:46:27 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Date: Fri, 23 Oct 2009 19:46:00 -0000 From: Jan Kratochvil To: Sami Wagiaalla Cc: archer@sourceware.org Subject: [expr-cumulative] Fix return type qualifier Message-ID: <20091023194617.GA31024@host0.dyn.jankratochvil.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-08-17) X-SW-Source: 2009-q4/txt/msg00025.txt.bz2 Hi Sami, OK to check-in? gcc-4.1.2-46.el5_4.1.x86_64 errors due to -Werror on: gdb/dwarf2read.c:3642: warning: type qualifiers ignored on function return type from code of e7c98bbe4bea801d53222c3337cbae3f3944547c Thanks, Jan * 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; }