This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[RFA 12/13] Add ATTRIBUTE_UNUSED to regdat.sh output
- From: Tom Tromey <tom at tromey dot com>
- To: gdb-patches at sourceware dot org
- Cc: Tom Tromey <tom at tromey dot com>
- Date: Thu, 12 Jul 2018 14:52:07 -0600
- Subject: [RFA 12/13] Add ATTRIBUTE_UNUSED to regdat.sh output
- References: <20180712205208.32646-1-tom@tromey.com>
This changes regdat.sh to emit ATTRIBUTE_UNUSED for the
xmltarget_${name} variable. This seemed simpler than trying to figure
out under exactly which circumstances each one was in fact used.
2018-07-12 Tom Tromey <tom@tromey.com>
* regformats/regdat.sh: Mark xmltarget_${name} with
ATTRIBUTE_UNUSED.
---
gdb/ChangeLog | 5 +++++
gdb/regformats/regdat.sh | 8 ++++----
2 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/gdb/regformats/regdat.sh b/gdb/regformats/regdat.sh
index 5a8564ac50c..7868e757582 100755
--- a/gdb/regformats/regdat.sh
+++ b/gdb/regformats/regdat.sh
@@ -164,12 +164,12 @@ done
echo
echo "static const char *expedite_regs_${name}[] = { \"`echo ${expedite} | sed 's/,/", "/g'`\", 0 };"
if test "${feature}" != x; then
- echo "static const char *xmltarget_${name} = 0;"
+ echo "static const char *xmltarget_${name} ATTRIBUTE_UNUSED = 0;"
elif test "${xmltarget}" = x; then
if test "${xmlarch}" = x && test "${xmlosabi}" = x; then
- echo "static const char *xmltarget_${name} = 0;"
+ echo "static const char *xmltarget_${name} ATTRIBUTE_UNUSED = 0;"
else
- echo "static const char *xmltarget_${name} = \"@<target>\\"
+ echo "static const char *xmltarget_${name} ATTRIBUTE_UNUSED = \"@<target>\\"
if test "${xmlarch}" != x; then
echo "<architecture>${xmlarch}</architecture>\\"
fi
@@ -179,7 +179,7 @@ elif test "${xmltarget}" = x; then
echo "</target>\";"
fi
else
- echo "static const char *xmltarget_${name} = \"${xmltarget}\";"
+ echo "static const char *xmltarget_${name} ATTRIBUTE_UNUSED = \"${xmltarget}\";"
fi
echo
--
2.13.6