Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <BLU0-SMTP168787CB587A1E596296FBDFDEF0@phx.gbl>
Date: Thu, 5 Jul 2012 19:13:39 +0200
From: Frank Dittrich <frank_dittrich@...mail.com>
To: john-dev@...ts.openwall.com
Subject: Silence -Wpointer-sign warnings in hmacSHA*_fmt_plug.c

With gcc 4.6.3, I get:

hmacSHA512_fmt_plug.c:48:26: warning: pointer targets in initialization
differ in signedness [-Wpointer-sign]
hmacSHA384_fmt_plug.c:47:26: warning: pointer targets in initialization
differ in signedness [-Wpointer-sign]
hmacSHA224_fmt_plug.c:43:26: warning: pointer targets in initialization
differ in signedness [-Wpointer-sign]
hmacSHA256_fmt_plug.c:44:26: warning: pointer targets in initialization
differ in signedness [-Wpointer-sign]

With clang 2.9:

hmacSHA512_fmt_plug.c:48:14: warning: initializing 'char *' with an
expression of type 'unsigned char [65]' converts between pointers to
integer types with different sign [-Wpointer-sign]
static char *crypt_key = u.c;  // Requires alignment on generic sha2.c
             ^           ~~~
1 warning generated.

and so on.

As far as I remember, they didn't occur in jumbo-6.
Should those warnings just be silenced by something like this:

-static char *crypt_key = u.c;  // Requires alignment on generic sha2.c
+static char *crypt_key = (char *)u.c;  // Requires alignment on generic
sha2.c


I think they can just be silenced, so here is a patch.

Frank

View attachment "0001-Silence-Wpointer-sign-warnings-in-hmacSHA-_fmt_plug..patch" of type "text/x-patch" (2670 bytes)

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.