[prev in list] [next in list] [prev in thread] [next in thread]
List: gdb-cvs
Subject: [binutils-gdb] Add ATTRIBUTE_PRINTF to printf_field_type_assignment
From: Simon Marchi <simark () sourceware ! org>
Date: 2017-12-23 21:28:27
Message-ID: 20171223212827.53632.qmail () sourceware ! org
[Download RAW message or body]
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=6e8c24fe27098f407000812e61fa8210095a7970
commit 6e8c24fe27098f407000812e61fa8210095a7970
Author: Simon Marchi <simon.marchi@polymtl.ca>
Date: Sat Dec 23 16:25:06 2017 -0500
Add ATTRIBUTE_PRINTF to printf_field_type_assignment
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)
<printf_field_type_assignment>: Add ATTRIBUTE_PRINTF.
Diff:
---
gdb/ChangeLog | 5 +++++
gdb/target-descriptions.c | 1 +
2 files changed, 6 insertions(+)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 1b4b13a..c81c611 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2017-12-23 Simon Marchi <simon.marchi@polymtl.ca>
+
+ * target-descriptions.c (print_c_tdesc)
+ <printf_field_type_assignment>: Add ATTRIBUTE_PRINTF.
+
2017-12-21 Simon Marchi <simon.marchi@ericsson.com>
Sergio Durigan Junior <sergiodj@redhat.com>
diff --git a/gdb/target-descriptions.c b/gdb/target-descriptions.c
index 5dcc4c4..b37f4f0 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)
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic