From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17106 invoked by alias); 28 Feb 2017 14:50:31 -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 16986 invoked by uid 89); 28 Feb 2017 14:50:30 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.2 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,KAM_LAZY_DOMAIN_SECURITY,KHOP_DYNAMIC,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 spammy=complaint, sk:filtere, complaints, do_cleanups X-HELO: mx0a-001b2d01.pphosted.com Received: from mx0a-001b2d01.pphosted.com (HELO mx0a-001b2d01.pphosted.com) (148.163.156.1) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 28 Feb 2017 14:50:27 +0000 Received: from pps.filterd (m0098393.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.20/8.16.0.20) with SMTP id v1SEmTUS034853 for ; Tue, 28 Feb 2017 09:50:26 -0500 Received: from e06smtp10.uk.ibm.com (e06smtp10.uk.ibm.com [195.75.94.106]) by mx0a-001b2d01.pphosted.com with ESMTP id 28w3d4xw68-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Tue, 28 Feb 2017 09:50:26 -0500 Received: from localhost by e06smtp10.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 28 Feb 2017 14:50:23 -0000 Received: from d06dlp02.portsmouth.uk.ibm.com (9.149.20.14) by e06smtp10.uk.ibm.com (192.168.101.140) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 28 Feb 2017 14:50:21 -0000 Received: from b06cxnps3075.portsmouth.uk.ibm.com (d06relay10.portsmouth.uk.ibm.com [9.149.109.195]) by d06dlp02.portsmouth.uk.ibm.com (Postfix) with ESMTP id 986772190056 for ; Tue, 28 Feb 2017 14:49:21 +0000 (GMT) Received: from d06av21.portsmouth.uk.ibm.com (d06av21.portsmouth.uk.ibm.com [9.149.105.232]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id v1SEoKpr49086506; Tue, 28 Feb 2017 14:50:20 GMT Received: from d06av21.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B862D5206C; Tue, 28 Feb 2017 13:48:55 +0000 (GMT) Received: from tuxmaker.boeblingen.de.ibm.com (unknown [9.152.85.9]) by d06av21.portsmouth.uk.ibm.com (Postfix) with ESMTPS id A26FD5204B; Tue, 28 Feb 2017 13:48:55 +0000 (GMT) From: Philipp Rudo To: gdb-patches@sourceware.org Cc: arnez@linux.vnet.ibm.com Subject: [PATCH 03/11] Remove unused deprecated_warning_hook Date: Tue, 28 Feb 2017 14:50:00 -0000 In-Reply-To: <20170228145016.22604-1-prudo@linux.vnet.ibm.com> References: <20170228145016.22604-1-prudo@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 X-Content-Scanned: Fidelis XPS MAILER x-cbid: 17022814-0040-0000-0000-0000033609F1 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17022814-0041-0000-0000-0000245429E8 Message-Id: <20170228145016.22604-4-prudo@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-02-28_13:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=3 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1612050000 definitions=main-1702280136 X-IsSubscribed: yes X-SW-Source: 2017-02/txt/msg00722.txt.bz2 Nobody actually uses this hook anymore. So simply remove it. gdb/ChangeLog * defs.h (deprecated_warning_hook): Remove. * top.c (deprecated_warning_hook): Remove. * complaints.c (vcomplaint): Adjust. * interps.c (clear_interpreter_hooks): Adjust. * utils.c (vwarning): Adjust. --- gdb/complaints.c | 2 -- gdb/defs.h | 2 -- gdb/interps.c | 1 - gdb/top.c | 4 ---- gdb/utils.c | 33 ++++++++++++++------------------- 5 files changed, 14 insertions(+), 28 deletions(-) diff --git a/gdb/complaints.c b/gdb/complaints.c index dc60dc3..587a039 100644 --- a/gdb/complaints.c +++ b/gdb/complaints.c @@ -185,8 +185,6 @@ vcomplaint (struct complaints **c, const char *file, if (complaint->file != NULL) internal_vwarning (complaint->file, complaint->line, fmt, args); - else if (deprecated_warning_hook) - (*deprecated_warning_hook) (fmt, args); else { if (complaints->explanation == NULL) diff --git a/gdb/defs.h b/gdb/defs.h index c92c41f..2052dd7 100644 --- a/gdb/defs.h +++ b/gdb/defs.h @@ -672,8 +672,6 @@ extern void (*deprecated_print_frame_info_listing_hook) (struct symtab * s, int noerror); extern int (*deprecated_query_hook) (const char *, va_list) ATTRIBUTE_FPTR_PRINTF(1,0); -extern void (*deprecated_warning_hook) (const char *, va_list) - ATTRIBUTE_FPTR_PRINTF(1,0); extern void (*deprecated_interactive_hook) (void); extern void (*deprecated_readline_begin_hook) (char *, ...) ATTRIBUTE_FPTR_PRINTF_1; diff --git a/gdb/interps.c b/gdb/interps.c index af86390..1336aaa 100644 --- a/gdb/interps.c +++ b/gdb/interps.c @@ -391,7 +391,6 @@ clear_interpreter_hooks (void) deprecated_print_frame_info_listing_hook = 0; /*print_frame_more_info_hook = 0; */ deprecated_query_hook = 0; - deprecated_warning_hook = 0; deprecated_interactive_hook = 0; deprecated_readline_begin_hook = 0; deprecated_readline_hook = 0; diff --git a/gdb/top.c b/gdb/top.c index 934f25d..4428b87 100644 --- a/gdb/top.c +++ b/gdb/top.c @@ -194,10 +194,6 @@ void (*deprecated_print_frame_info_listing_hook) (struct symtab * s, int (*deprecated_query_hook) (const char *, va_list); -/* Replaces most of warning. */ - -void (*deprecated_warning_hook) (const char *, va_list); - /* These three functions support getting lines of text from the user. They are used in sequence. First deprecated_readline_begin_hook is called with a text string that might be (for example) a message for diff --git a/gdb/utils.c b/gdb/utils.c index 27021a1..987373a 100644 --- a/gdb/utils.c +++ b/gdb/utils.c @@ -399,27 +399,22 @@ free_current_contents (void *ptr) void vwarning (const char *string, va_list args) { - if (deprecated_warning_hook) - (*deprecated_warning_hook) (string, args); - else - { - struct cleanup *old_chain = make_cleanup (null_cleanup, NULL); - - if (target_supports_terminal_ours ()) - { - make_cleanup_restore_target_terminal (); - target_terminal_ours_for_output (); - } - if (filtered_printing_initialized ()) - wrap_here (""); /* Force out any buffered output. */ - gdb_flush (gdb_stdout); - if (warning_pre_print) - fputs_unfiltered (warning_pre_print, gdb_stderr); - vfprintf_unfiltered (gdb_stderr, string, args); - fprintf_unfiltered (gdb_stderr, "\n"); + struct cleanup *old_chain = make_cleanup (null_cleanup, NULL); - do_cleanups (old_chain); + if (target_supports_terminal_ours ()) + { + make_cleanup_restore_target_terminal (); + target_terminal_ours_for_output (); } + if (filtered_printing_initialized ()) + wrap_here (""); /* Force out any buffered output. */ + gdb_flush (gdb_stdout); + if (warning_pre_print) + fputs_unfiltered (warning_pre_print, gdb_stderr); + vfprintf_unfiltered (gdb_stderr, string, args); + fprintf_unfiltered (gdb_stderr, "\n"); + + do_cleanups (old_chain); } /* Print an error message and return to command level. -- 2.8.4