Home GnuPG

DES: Silence compiler warnings on Windows
6c21cf5fed1aUnpublished

Unpublished Commit ยท Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent ref.

Description

DES: Silence compiler warnings on Windows

* cipher/des.c (working_memcmp): Make pointer arguments 'const void *'.

Following warning seen on Windows target build:

des.c: In function 'is_weak_key':
des.c:1019:40: warning: pointer targets in passing argument 1 of 'working_memcmp' differ in signedness [-Wpointer-sign]

if ( !(cmp_result=working_memcmp(work, weak_keys[middle], 8)) )
                                 ^

des.c:149:1: note: expected 'const char *' but argument is of type 'unsigned char *'
working_memcmp( const char *a, const char *b, size_t n )
^
des.c:1019:46: warning: pointer targets in passing argument 2 of 'working_memcmp' differ in signedness [-Wpointer-sign]

if ( !(cmp_result=working_memcmp(work, weak_keys[middle], 8)) )
                                       ^

des.c:149:1: note: expected 'const char *' but argument is of type 'unsigned char *'
working_memcmp( const char *a, const char *b, size_t n )
^

  • Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>

Details

Provenance
jukiviliAuthored on May 1 2015, 6:15 PM
Parents
rC9cf224322007: Cast pointers to integers using uintptr_t instead of long
Branches
Unknown
Tags
Unknown

Event Timeline

Jussi Kivilinna <jussi.kivilinna@iki.fi> committed rC6c21cf5fed1a: DES: Silence compiler warnings on Windows (authored by Jussi Kivilinna <jussi.kivilinna@iki.fi>).May 1 2015, 6:15 PM