random-csprng: fix compiler warnings on ARM
authorJussi Kivilinna <jussi.kivilinna@iki.fi>
Tue, 23 Dec 2014 11:33:12 +0000 (13:33 +0200)
committerJussi Kivilinna <jussi.kivilinna@iki.fi>
Thu, 25 Dec 2014 09:16:50 +0000 (11:16 +0200)
commitc2e1f8fea271f3ef8027809547c4a52e0b1e24a2
treed23552fb07e1e8a5514be638f1e8a0b047093bf8
parent1dab4c9422bf0f3cdc7a4d3ccf9db090abd90e94
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>
random/random-csprng.c