bug-grep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 1/3] colorize: use isatty module


From: Paolo Bonzini
Subject: Re: [PATCH 1/3] colorize: use isatty module
Date: Tue, 03 Jan 2012 10:31:12 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:9.0) Gecko/20111222 Thunderbird/9.0

On 01/03/2012 10:27 AM, Jim Meyering wrote:
To address grep's immediate problem -- I require use of
--enable-gcc-warnings and want to continue using the newer gcc --
I have applied this:

diff --git a/lib/colorize-posix.c b/lib/colorize-posix.c
index 37bc640..116bbb2 100644
--- a/lib/colorize-posix.c
+++ b/lib/colorize-posix.c
@@ -16,6 +16,12 @@
     Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
     02110-1301, USA.  */

+/* Without this pragma, gcc 4.7.0 20120102 suggests that the
+   init_colorize function might be candidate for attribute 'const'  */
+#if (__GNUC__ == 4&&  6<= __GNUC_MINOR__) || 4<  __GNUC__
+# pragma GCC diagnostic ignored "-Wsuggest-attribute=const"
+#endif
+
  #include<config.h>

  #include "colorize.h"
--
1.7.8.1.391.g2c2ad


Thanks.

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]