Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110602120055.GA19372@openwall.com>
Date: Thu, 2 Jun 2011 16:00:55 +0400
From: Solar Designer <solar@...nwall.com>
To: john-dev@...ts.openwall.com
Subject: Re: Compiler warnings

magnum -

On Thu, Jun 02, 2011 at 01:49:35PM +0200, magnum wrote:
> I've had the following compiler warnings all the time from jumbo-1 or 
> earlier (possibly non-jumbo too).

These are since 1.7.6, some pre-date 1.7.6 (but they only appeared with
new glibc).

> Maybe you don't get them

I do (on some systems).

> and I assume they are all harmless

They are.

> but if you visit the code it would be nice to get rid of them.

Maybe, but see below:

> DES_bs_b.c:353:2: warning: #warning Notice: with recent versions of gcc, 
> we are currently using SSE2 intrinsics instead of the supplied SSE2 
> assembly code. This choice is made in the x86-*.h file.

This one is on purpose.  I did not want people to be surprised that
x86-64.S is unused on their -x86-64 build just because they used new
gcc.  Maybe it's time to remove it.  What do you say?

> DES_bs_b.c: In function ???DES_bs_crypt???:
> DES_bs_b.c:767:2: warning: ???zero??? is used uninitialized in this function
> DES_bs_b.c: In function ???DES_bs_crypt_25???:
> DES_bs_b.c:863:2: warning: ???zero??? is used uninitialized in this function
> DES_bs_b.c: In function ???DES_bs_crypt_LM???:
> DES_bs_b.c:973:2: warning: ???zero??? is used uninitialized in this function

I am not aware of a way to get rid of these without making the code
slightly worse.  Are you?

> charset.c: In function ???charset_read_header???:
> charset.c:107:7: warning: ignoring return value of ???fread???, declared 
> with attribute warn_unused_result
> charset.c:109:8: warning: ignoring return value of ???fread???, declared 
> with attribute warn_unused_result
> charset.c:116:7: warning: ignoring return value of ???fread???, declared 
> with attribute warn_unused_result
> charset.c:117:7: warning: ignoring return value of ???fread???, declared 
> with attribute warn_unused_result
> idle.c: In function ???idle_init???:
> idle.c:75:6: warning: ignoring return value of ???nice???, declared with 
> attribute warn_unused_result
> inc.c: In function ???do_incremental_crack???:
> inc.c:538:7: warning: ignoring return value of ???fread???, declared with 
> attribute warn_unused_result

These appeared with new glibc.  They're fixed in CVS by now.

Thanks,

Alexander

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.