From patchwork Sat Dec 23 21:28:44 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Marchi X-Patchwork-Id: 25095 Received: (qmail 54348 invoked by alias); 23 Dec 2017 21:28:58 -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 54339 invoked by uid 89); 23 Dec 2017 21:28:58 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.2 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_SOFTFAIL autolearn=ham version=3.3.2 spammy= X-HELO: barracuda.ebox.ca Received: from barracuda.ebox.ca (HELO barracuda.ebox.ca) (96.127.255.19) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 23 Dec 2017 21:28:56 +0000 X-ASG-Debug-ID: 1514064525-0c856e65d441a2170001-fS2M51 Received: from smtp.ebox.ca (smtp.electronicbox.net [96.127.255.82]) by barracuda.ebox.ca with ESMTP id 7vcNOnkoww4BjAHk (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 23 Dec 2017 16:28:45 -0500 (EST) X-Barracuda-Envelope-From: simon.marchi@polymtl.ca X-Barracuda-RBL-Trusted-Forwarder: 96.127.255.82 Received: from simark.lan (192-222-251-162.qc.cable.ebox.net [192.222.251.162]) by smtp.ebox.ca (Postfix) with ESMTP id 0ECDE441D64; Sat, 23 Dec 2017 16:28:45 -0500 (EST) From: Simon Marchi X-Barracuda-Effective-Source-IP: 192-222-251-162.qc.cable.ebox.net[192.222.251.162] X-Barracuda-Apparent-Source-IP: 192.222.251.162 X-Barracuda-RBL-IP: 192.222.251.162 To: gdb-patches@sourceware.org Cc: Simon Marchi Subject: [pushed] Add ATTRIBUTE_PRINTF to printf_field_type_assignment Date: Sat, 23 Dec 2017 16:28:44 -0500 X-ASG-Orig-Subj: [pushed] Add ATTRIBUTE_PRINTF to printf_field_type_assignment Message-Id: <20171223212844.30322-1-simon.marchi@polymtl.ca> X-Barracuda-Connect: smtp.electronicbox.net[96.127.255.82] X-Barracuda-Start-Time: 1514064525 X-Barracuda-Encrypted: DHE-RSA-AES256-SHA X-Barracuda-URL: https://96.127.255.19:443/cgi-mod/mark.cgi X-Barracuda-Scan-Msg-Size: 1348 X-Barracuda-BRTS-Status: 1 X-Barracuda-Spam-Score: 0.50 X-Barracuda-Spam-Status: No, SCORE=0.50 using global scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=8.0 tests=BSF_RULE7568M X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.46196 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.50 BSF_RULE7568M Custom Rule 7568M X-IsSubscribed: yes Get rid of: /home/simark/src/binutils-gdb/gdb/target-descriptions.c:2026:25: error: format string is not a string literal [-Werror,-Wformat-nonliteral] vprintf_unfiltered (fmt, args); when building with clang. gdb/ChangeLog: * target-descriptions.c (print_c_tdesc) : Add ATTRIBUTE_PRINTF. --- gdb/ChangeLog | 5 +++++ gdb/target-descriptions.c | 1 + 2 files changed, 6 insertions(+) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 1b4b13aba9..c81c611e9a 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2017-12-23 Simon Marchi + + * target-descriptions.c (print_c_tdesc) + : Add ATTRIBUTE_PRINTF. + 2017-12-21 Simon Marchi Sergio Durigan Junior diff --git a/gdb/target-descriptions.c b/gdb/target-descriptions.c index 5dcc4c4c5c..b37f4f0c19 100644 --- a/gdb/target-descriptions.c +++ b/gdb/target-descriptions.c @@ -2011,6 +2011,7 @@ private: /* Print an assignment to the field_type variable. Print the declaration of field_type if that has not been done yet. */ + ATTRIBUTE_PRINTF (2, 3) void printf_field_type_assignment (const char *fmt, ...) { if (!m_printed_field_type)