Home GnuPG

random-csprng: fix compiler warnings on ARM
c2e1f8fea271Unpublished

Unpublished Commit ยท Learn More

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

Description

random-csprng: fix compiler warnings on ARM

* random/random-csprng.c (_gcry_rngcsprng_update_seed_file)
(read_pool): Cast keypool and rndpool to 'unsigned long *' through
'void *'.

Patch fixes 'cast increases required alignment' warnings seen on GCC:

random-csprng.c: In function '_gcry_rngcsprng_update_seed_file':
random-csprng.c:867:15: warning: cast increases required alignment of target type [-Wcast-align]

for (i=0,dp=(unsigned long*)keypool, sp=(unsigned long*)rndpool;
            ^

random-csprng.c:867:43: warning: cast increases required alignment of target type [-Wcast-align]

for (i=0,dp=(unsigned long*)keypool, sp=(unsigned long*)rndpool;
                                        ^

random-csprng.c: In function 'read_pool':
random-csprng.c:1023:14: warning: cast increases required alignment of target type [-Wcast-align]

for(i=0,dp=(unsigned long*)keypool, sp=(unsigned long*)rndpool;
           ^

random-csprng.c:1023:42: warning: cast increases required alignment of target type [-Wcast-align]

for(i=0,dp=(unsigned long*)keypool, sp=(unsigned long*)rndpool;
                                       ^
  • Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>

Details

Provenance
jukiviliAuthored on Dec 23 2014, 12:33 PM
Parents
rC1dab4c9422bf: scrypt: fix compiler warnings on ARM
Branches
Unknown
Tags
Unknown

Event Timeline

Jussi Kivilinna <jussi.kivilinna@iki.fi> committed rCc2e1f8fea271: random-csprng: fix compiler warnings on ARM (authored by Jussi Kivilinna <jussi.kivilinna@iki.fi>).Dec 25 2014, 10:16 AM