[commit][AArch64] Added ATTRIBUTE_UNUSED to unused local variable

Yufeng Zhang Yufeng.Zhang@arm.com
Tue Nov 20 10:51:00 GMT 2012


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);



More information about the Binutils mailing list