From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 120262 invoked by alias); 6 Jun 2016 21:34:04 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 119942 invoked by uid 89); 6 Jun 2016 21:34:01 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.8 required=5.0 tests=AWL,BAYES_00,FSL_HELO_HOME,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=no version=3.3.2 spammy=1987, mass X-HELO: gproxy7-pub.mail.unifiedlayer.com Received: from gproxy7-pub.mail.unifiedlayer.com (HELO gproxy7-pub.mail.unifiedlayer.com) (70.40.196.235) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with SMTP; Mon, 06 Jun 2016 21:33:45 +0000 Received: (qmail 19383 invoked by uid 0); 6 Jun 2016 21:33:43 -0000 Received: from unknown (HELO cmgw3) (10.0.90.84) by gproxy7.mail.unifiedlayer.com with SMTP; 6 Jun 2016 21:33:43 -0000 Received: from box522.bluehost.com ([74.220.219.122]) by cmgw3 with id 3ZZg1t00i2f2jeq01ZZj7L; Mon, 06 Jun 2016 15:33:43 -0600 X-Authority-Analysis: v=2.1 cv=KpLehwmN c=1 sm=1 tr=0 a=GsOEXm/OWkKvwdLVJsfwcA==:117 a=GsOEXm/OWkKvwdLVJsfwcA==:17 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=PnD2wP_eR3oA:10 a=-N9Dh3nx2ZYA:10 a=pD_ry4oyNxEA:10 a=zstS-IiYAAAA:8 a=Nd7O1ydDheJyphjIpzYA:9 a=4G6NA9xxw8l3yy4pmD5M:22 Received: from [65.128.48.199] (port=46482 helo=bapiya.Home) by box522.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.86_2) (envelope-from ) id 1bA29U-0006Xd-0z; Mon, 06 Jun 2016 15:33:40 -0600 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [RFA 2/6] Use ATTRIBUTE_UNUSED in some places Date: Mon, 06 Jun 2016 21:34:00 -0000 Message-Id: <1465248812-23902-3-git-send-email-tom@tromey.com> In-Reply-To: <1465248812-23902-1-git-send-email-tom@tromey.com> References: <1465248812-23902-1-git-send-email-tom@tromey.com> X-Identified-User: {36111:box522.bluehost.com:elynrobi:tromey.com} {sentby:smtp auth 65.128.48.199 authed with tom+tromey.com} X-Exim-ID: 1bA29U-0006Xd-0z X-Source-Sender: (bapiya.Home) [65.128.48.199]:46482 X-Source-Auth: tom+tromey.com X-Email-Count: 0 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTIyLmJsdWVob3N0LmNvbQ== X-SW-Source: 2016-06/txt/msg00119.txt.bz2 A few spots needed ATTRIBUTE_UNUSED to cope with the new warnings. In the TUI this happens due to the odd way that "getyx" works -- it essentially uses references, so a variable must be passed in, even if the code doesn't need to use it. The case in inflow.c is just a mass of ifdefs; and while the only use of "result" is guarded by "#if 0", I thought it simplest to leave it all in place. 2016-06-06 Tom Tromey * tui/tui-winsource.c (tui_show_source_line): Use ATTRIBUTE_UNUSED. * tui/tui-io.c (tui_puts): Use ATTRIBUTE_UNUSED. (tui_redisplay_readline): Likewise. * inflow.c (child_terminal_ours_1): Use ATTRIBUTE_UNUSED. --- gdb/ChangeLog | 8 ++++++++ gdb/inflow.c | 2 +- gdb/tui/tui-io.c | 6 ++++-- gdb/tui/tui-winsource.c | 3 ++- 4 files changed, 15 insertions(+), 4 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 649bb0b..fbd7051 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,13 @@ 2016-06-06 Tom Tromey + * tui/tui-winsource.c (tui_show_source_line): Use + ATTRIBUTE_UNUSED. + * tui/tui-io.c (tui_puts): Use ATTRIBUTE_UNUSED. + (tui_redisplay_readline): Likewise. + * inflow.c (child_terminal_ours_1): Use ATTRIBUTE_UNUSED. + +2016-06-06 Tom Tromey + * corefile.c (reopen_exec_file): Only examine st.st_mtime if stat succeeded. diff --git a/gdb/inflow.c b/gdb/inflow.c index 4c80dbd..9b94b29 100644 --- a/gdb/inflow.c +++ b/gdb/inflow.c @@ -419,7 +419,7 @@ child_terminal_ours_1 (int output_only) pgrp. */ sighandler_t osigttou = NULL; #endif - int result; + int result ATTRIBUTE_UNUSED; #ifdef SIGTTOU if (job_control) diff --git a/gdb/tui/tui-io.c b/gdb/tui/tui-io.c index 3fa32db..35025ce 100644 --- a/gdb/tui/tui-io.c +++ b/gdb/tui/tui-io.c @@ -172,7 +172,8 @@ tui_puts (const char *string) /* Expand TABs, since ncurses on MS-Windows doesn't. */ if (c == '\t') { - int line, col; + int line ATTRIBUTE_UNUSED; + int col; getyx (w, line, col); do @@ -198,7 +199,8 @@ tui_redisplay_readline (void) { int prev_col; int height; - int col, line; + int col; + int line ATTRIBUTE_UNUSED; int c_pos; int c_line; int in; diff --git a/gdb/tui/tui-winsource.c b/gdb/tui/tui-winsource.c index 48975b6..48bfbe4 100644 --- a/gdb/tui/tui-winsource.c +++ b/gdb/tui/tui-winsource.c @@ -273,7 +273,8 @@ static void tui_show_source_line (struct tui_win_info *win_info, int lineno) { struct tui_win_element *line; - int x, y; + int x; + int y ATTRIBUTE_UNUSED; line = win_info->generic.content[lineno - 1]; if (line->which_element.source.is_exec_point) -- 2.5.5