[Top][All Lists]

[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:14:45 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:9.0) Gecko/20111222 Thunderbird/9.0

On 01/03/2012 09:48 AM, Jim Meyering wrote:
Paolo Bonzini wrote:

* bootstrap.conf: Add isatty module.
* gnulib: Update to latest.
* lib/colorize.h: Remove argument from should_colorize.
* lib/ms/colorize.h: Likewise.
* lib/colorize-impl.c: Factor isatty call out of here...
* lib/ms/colorize-impl.c: ... and here...
* src/main.c: ... into here.

Hi Paolo,
At least with gcc-4.7.0 20120102, a warning-enabled build now fails like this:

   colorize.c: In function 'init_colorize':
   colorize.c:37:6: error: function might be candidate for attribute 'const' 
   cc1: all warnings being treated as errors

Thanks, my GCC is indeed older.

Perhaps GCC should be changed to avoid the warning on functions returning void. If a void function can be const, it pretty much has to be empty, and so it is quite likely a placeholder for something that is not const.


reply via email to

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