GNU bug report logs - #11829
Build failure with --enable-gcc-warnings

Previous Next

Package: coreutils;

Reported by: Stefano Lattarini <stefano.lattarini <at> gmail.com>

Date: Sat, 30 Jun 2012 22:28:02 UTC

Severity: normal

Done: Pádraig Brady <P <at> draigBrady.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Stefano Lattarini <stefano.lattarini <at> gmail.com>
Subject: bug#11829: closed (Re: bug#11829: Build failure with
 --enable-gcc-warnings)
Date: Sat, 30 Jun 2012 23:16:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#11829: Build failure with --enable-gcc-warnings

which was filed against the coreutils package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 11829 <at> debbugs.gnu.org.

-- 
11829: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=11829
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Pádraig Brady <P <at> draigBrady.com>
To: Stefano Lattarini <stefano.lattarini <at> gmail.com>
Cc: 11829-done <at> debbugs.gnu.org
Subject: Re: bug#11829: Build failure with --enable-gcc-warnings
Date: Sun, 01 Jul 2012 00:10:41 +0100
On 06/30/2012 11:22 PM, Stefano Lattarini wrote:
> Trying to build the latest coreutils from master:
> 
>   $ make all
>   ...
>     CC       stty.o
>   stty.c: In function 'main':
>   stty.c:740:8: error: variable 'speed_was_set' set but not used [-Werror=unused-but-set-variable]
>   cc1: all warnings being treated as errors
>   make[3]: *** [stty.o] Error 1
> 
>   $ uname -rmos
>   Linux 3.3.1-3.fc16.ppc64 ppc64 GNU/Linux
> 
>   $ gcc --version
>   gcc (GCC) 4.6.3 20120306 (Red Hat 4.6.3-2)
>   Copyright (C) 2011 Free Software Foundation, Inc.
>   This is free software; see the source for copying conditions.  There is NO
>   warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
> 
> Let me know if you need more information.

This should address it:

commit 8f4dcad477da1a952a04478ae125d5453f29dcc9
Author: Pádraig Brady <P <at> draigBrady.com>
Date:   Sun Jul 1 00:04:37 2012 +0100

    maint: avoid a -Wunsed-but-set warning on some systems

    * src/stty.c (main): Mark speed_was_set as unused when
    CIBAUD undefined (like on ppc64 GNU/Linux for example).
    Reported-by: Stefano Lattarini

diff --git a/src/stty.c b/src/stty.c
index 83b502c..b2dd849 100644
--- a/src/stty.c
+++ b/src/stty.c
@@ -737,7 +737,11 @@ main (int argc, char **argv)
   int argi = 0;
   int opti = 1;
   bool require_set_attr;
+#ifdef CIBAUD
   bool speed_was_set;
+#else
+  bool speed_was_set ATTRIBUTE_UNUSED;
+#endif
   bool verbose_output;
   bool recoverable_output;
   int k;


[Message part 3 (message/rfc822, inline)]
From: Stefano Lattarini <stefano.lattarini <at> gmail.com>
To: bug-coreutils <at> gnu.org
Subject: Build failure with --enable-gcc-warnings
Date: Sun, 01 Jul 2012 00:22:22 +0200
Trying to build the latest coreutils from master:

  $ make all
  ...
    CC       stty.o
  stty.c: In function 'main':
  stty.c:740:8: error: variable 'speed_was_set' set but not used [-Werror=unused-but-set-variable]
  cc1: all warnings being treated as errors
  make[3]: *** [stty.o] Error 1

  $ uname -rmos
  Linux 3.3.1-3.fc16.ppc64 ppc64 GNU/Linux

  $ gcc --version
  gcc (GCC) 4.6.3 20120306 (Red Hat 4.6.3-2)
  Copyright (C) 2011 Free Software Foundation, Inc.
  This is free software; see the source for copying conditions.  There is NO
  warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Let me know if you need more information.

Regards,
  Stefano



This bug report was last modified 13 years and 22 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.