Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a97cbf088cecf5d612b42fd8f345058b@smtp.hushmail.com>
Date: Tue, 15 Jan 2013 22:29:51 +0100
From: magnum <john.magnum@...hmail.com>
To: john-dev@...ts.openwall.com
Subject: Re: New compiler warnings (was: charset.c warnings)

Solar,


On 15 Jan, 2013, at 20:10 , magnum <john.magnum@...hmail.com> wrote:
> On 24 Dec, 2012, at 21:01 , Solar Designer <solar@...nwall.com> wrote:
>> On Mon, Dec 24, 2012 at 02:48:30AM +0100, Lukas Odzioba wrote:
>>> charset.c: In function ?charset_generate_chars?:
>>> charset.c:180:8: warning: ignoring return value of ?fwrite?, declared
>>> with attribute warn_unused_result
>> 
>> Yeah, I expected that we'd start getting these eventually.  First they
>> added warnings for fread(), now also for fwrite().
> 
> We also get these with gcc-4.7:
> 
> DES_bs.c:310:25: warning: always_inline function might not be inlinable [-Wattributes]
> MD5_std.c:587:24: warning: always_inline function might not be inlinable [-Wattributes]
> trip_fmt.c:341:26: warning: always_inline function might not be inlinable [-Wattributes]
> trip_fmt.c:294:26: warning: always_inline function might not be inlinable [-Wattributes]
> dynamic_fmt.c: In function 'cmp_all':
> dynamic_fmt.c:1311:4: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
> dynamic_fmt.c: In function 'cmp_all_64_4x6':
> dynamic_fmt.c:1350:4: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
> wpapsk_fmt.c:68:26: warning: always_inline function might not be inlinable [-Wattributes]
> In file included from wpapsk_fmt.c:15:0:
> wpapsk.h:180:26: warning: always_inline function might not be inlinable [-Wattributes]
> lotus5_fmt_plug.c:176:19: warning: always_inline function might not be inlinable [-Wattributes]
> lotus5_fmt_plug.c:159:1: warning: always_inline function might not be inlinable [-Wattributes]
> pkzip_fmt_plug.c:1141:12: warning: always_inline function might not be inlinable [-Wattributes]
> pkzip_fmt_plug.c:1054:12: warning: always_inline function might not be inlinable [-Wattributes]
> 
> 
> Adding -Wno-attributes obviously works fine but would that mute things we'd like to see? Here's the man page on that:
> 
>   Do not warn if an unexpected "__attribute__" is used, such as
>   unrecognized attributes, function attributes applied to variables,
>   etc.  This will not stop errors for incorrect use of supported
>   attributes.


Frank pointed out that the following will mute the inline warnings:

  -#define MAYBE_INLINE attribute((always_inline))
  +#define MAYBE_INLINE attribute((always_inline)) inline

Should we commit this? I don't really understand the difference.

magnum

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.