This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[commit][AArch64] Added ATTRIBUTE_UNUSED to unused local variable
- From: Yufeng Zhang <Yufeng dot Zhang at arm dot com>
- To: "binutils at sourceware dot org" <binutils at sourceware dot org>
- Date: Tue, 20 Nov 2012 10:51:22 +0000
- Subject: [commit][AArch64] Added ATTRIBUTE_UNUSED to unused local variable
Hi,
The following patch has been committed to the trunk and the 2.23 release
branch to resolve a build failure when the source is configured with
--disable-checking --enable-werror. The variable 'ret' is unused when
checking is disabled.
Thanks,
Yufeng
diff --git a/gas/config/tc-aarch64.c b/gas/config/tc-aarch64.c
index e7a2fe0..bf72a13 100644
--- a/gas/config/tc-aarch64.c
+++ b/gas/config/tc-aarch64.c
@@ -643,7 +643,7 @@ first_error_fmt (const char *format, ...)
if (! error_p ())
{
- int ret;
+ int ret ATTRIBUTE_UNUSED;
va_start (args, format);
ret = vsnprintf (buffer, size, format, args);
know (ret <= size - 1 && ret >= 0);