From patchwork Tue Oct 10 19:17:19 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Egeyar Bagcioglu X-Patchwork-Id: 23461 Received: (qmail 59964 invoked by alias); 10 Oct 2017 19:17:30 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 59954 invoked by uid 89); 10 Oct 2017 19:17:29 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 spammy=GLOBAL, 3159, 1.9.1 X-HELO: aserp1040.oracle.com Received: from aserp1040.oracle.com (HELO aserp1040.oracle.com) (141.146.126.69) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 10 Oct 2017 19:17:28 +0000 Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id v9AJHQGT012326 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 10 Oct 2017 19:17:26 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id v9AJHPCv032403 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 10 Oct 2017 19:17:26 GMT Received: from abhmp0003.oracle.com (abhmp0003.oracle.com [141.146.116.9]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id v9AJHPoS028626 for ; Tue, 10 Oct 2017 19:17:25 GMT Received: from [10.175.170.22] (/10.175.170.22) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 10 Oct 2017 12:17:25 -0700 To: gdb-patches@sourceware.org From: Egeyar Bagcioglu Subject: [Patch] Remove unnecessary parentheses in declarations. Message-ID: <6f52280b-66f1-1a68-82a4-28d122cf54c7@oracle.com> Date: Tue, 10 Oct 2017 21:17:19 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 X-IsSubscribed: yes Hello, Due to a new warning introduced to GCC last Thursday (commit a94975e57), building binutils/gdb with upstream gcc fails. Therefore, I prepared a patch to avoid triggering this new warning. Please review the patch and apply if legitimate. Thanks, Egeyar From 988d097e561d70b3c530a913e26f839fcbbcc467 Mon Sep 17 00:00:00 2001 From: Egeyar Bagcioglu Date: Tue, 10 Oct 2017 03:48:22 -0700 Subject: [PATCH] Remove unnecessary parentheses in declarations. GCC commit a94975e57 introduces new warnings "unnecessary parentheses in the declaration of ...". These cause the build of binutils and gdb to fail. This patch removes those parentheses for a successful build. 2017-10-10 Egeyar Bagcioglu * macrotab.h (macro_lookup_inclusion): Remove unnecessary parentheses in the declaration. (macro_lookup_inclusion): Likewise. (macro_lookup_definition): Likewise * p-lang.h (pascal_builtin_types): Likewise. * tui/tui-data.c (tui_win_list): Likewise. * tui/tui-data.h (tui_win_list): Likewise. * utils.h (make_cleanup_free_section_addr_info): Likewise. --- gdb/macrotab.h | 12 ++++++------ gdb/p-lang.h | 2 +- gdb/tui/tui-data.c | 2 +- gdb/tui/tui-data.h | 2 +- gdb/utils.h | 4 ++-- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/gdb/macrotab.h b/gdb/macrotab.h index 16e959a..90b280b 100644 --- a/gdb/macrotab.h +++ b/gdb/macrotab.h @@ -230,9 +230,9 @@ void macro_define_special (struct macro_table *table); path. e.g., `stdio.h', not `/usr/include/stdio.h'. If NAME appears more than once in the inclusion tree, return the least-nested inclusion --- the one closest to the main source file. */ -struct macro_source_file *(macro_lookup_inclusion +struct macro_source_file *macro_lookup_inclusion (struct macro_source_file *source, - const char *name)); + const char *name); /* Record an object-like #definition (i.e., one with no parameter list). @@ -315,9 +315,9 @@ struct macro_definition effect at the end of the file. The macro table owns the structure; the caller need not free it. Return zero if NAME is not #defined at that point. */ -struct macro_definition *(macro_lookup_definition +struct macro_definition *macro_lookup_definition (struct macro_source_file *source, - int line, const char *name)); + int line, const char *name); /* Return the source location of the definition for NAME in scope at @@ -325,11 +325,11 @@ struct macro_definition *(macro_lookup_definition number of the definition, and return a source file structure for the file. Return zero if NAME has no definition in scope at that point, and leave *DEFINITION_LINE unchanged. */ -struct macro_source_file *(macro_definition_location +struct macro_source_file *macro_definition_location (struct macro_source_file *source, int line, const char *name, - int *definition_line)); + int *definition_line); /* Prototype for a callback callable when walking a macro table. NAME is the name of the macro, and DEFINITION is the definition. SOURCE diff --git a/gdb/p-lang.h b/gdb/p-lang.h index 96a290b..1f82c1a 100644 --- a/gdb/p-lang.h +++ b/gdb/p-lang.h @@ -59,7 +59,7 @@ extern void pascal_printstr (struct ui_file *, struct type *, const gdb_byte *, unsigned int, const char *, int, const struct value_print_options *); -extern struct type **const (pascal_builtin_types[]); +extern struct type **const pascal_builtin_types[]; /* These are in p-typeprint.c: */ diff --git a/gdb/tui/tui-data.c b/gdb/tui/tui-data.c index 749a62e..66e2043 100644 --- a/gdb/tui/tui-data.c +++ b/gdb/tui/tui-data.c @@ -29,7 +29,7 @@ /**************************** ** GLOBAL DECLARATIONS ****************************/ -struct tui_win_info *(tui_win_list[MAX_MAJOR_WINDOWS]); +struct tui_win_info *tui_win_list[MAX_MAJOR_WINDOWS]; /*************************** ** Private data diff --git a/gdb/tui/tui-data.h b/gdb/tui/tui-data.h index 2a4f55b..7beb272 100644 --- a/gdb/tui/tui-data.h +++ b/gdb/tui/tui-data.h @@ -293,7 +293,7 @@ extern void tui_set_win_highlight (struct tui_win_info *win_info, /* Global Data. */ -extern struct tui_win_info *(tui_win_list[MAX_MAJOR_WINDOWS]); +extern struct tui_win_info *tui_win_list[MAX_MAJOR_WINDOWS]; #define TUI_SRC_WIN tui_win_list[SRC_WIN] #define TUI_DISASM_WIN tui_win_list[DISASSEM_WIN] diff --git a/gdb/utils.h b/gdb/utils.h index 7af0a5f..4ca2a97 100644 --- a/gdb/utils.h +++ b/gdb/utils.h @@ -206,8 +206,8 @@ private: /* Cleanup utilities. */ struct section_addr_info; -extern struct cleanup *(make_cleanup_free_section_addr_info - (struct section_addr_info *)); +extern struct cleanup *make_cleanup_free_section_addr_info + (struct section_addr_info *); /* For make_cleanup_close see common/filestuff.h. */ -- 1.9.1