diff options
author | Andy Polyakov <appro@openssl.org> | 2004-05-29 19:11:29 +0000 |
---|---|---|
committer | Andy Polyakov <appro@openssl.org> | 2004-05-29 19:11:29 +0000 |
commit | 8d9fb0f04ab342f5da92d7af0d7758f30fb676dc (patch) | |
tree | 741b5767138ac9d7863d8f9d4a516dd3f9316e78 /crypto/sha/sha512.c | |
parent | 15fd2de37c2e5f7877af1d90a6bcc1c004f47a79 (diff) | |
download | openssl-8d9fb0f04ab342f5da92d7af0d7758f30fb676dc.zip openssl-8d9fb0f04ab342f5da92d7af0d7758f30fb676dc.tar.gz openssl-8d9fb0f04ab342f5da92d7af0d7758f30fb676dc.tar.bz2 |
gcc -Wcast-qual clean-up.
Diffstat (limited to 'crypto/sha/sha512.c')
-rw-r--r-- | crypto/sha/sha512.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/crypto/sha/sha512.c b/crypto/sha/sha512.c index 22d9168..0549e6f 100644 --- a/crypto/sha/sha512.c +++ b/crypto/sha/sha512.c @@ -144,7 +144,8 @@ int SHA512_Final (unsigned char *md,SHA512_CTX *c) int SHA512_Update (SHA512_CTX *c, const void *_data, size_t len) { SHA_LONG64 l; - unsigned char *p=c->u.p,*data=(unsigned char *)_data; + unsigned char *p=c->u.p; + const unsigned char *data=(const unsigned char *)_data; if (len==0) return 1; @@ -268,7 +269,7 @@ static const SHA_LONG64 K512[80] = { #ifndef PEDANTIC # if defined(__GNUC__) && __GNUC__>=2 && !defined(OPENSSL_NO_ASM) && !defined(OPENSSL_NO_INLINE_ASM) # if defined(__x86_64) || defined(__x86_64__) -# define PULL64(x) ({ SHA_LONG64 ret=*((SHA_LONG64 *)(&(x))); \ +# define PULL64(x) ({ SHA_LONG64 ret=*((const SHA_LONG64 *)(&(x))); \ asm ("bswapq %0" \ : "=r"(ret) \ : "0"(ret)); ret; }) @@ -277,7 +278,7 @@ static const SHA_LONG64 K512[80] = { #endif #ifndef PULL64 -#define B(x,j) (((SHA_LONG64)(*(((unsigned char *)(&x))+j)))<<((7-j)*8)) +#define B(x,j) (((SHA_LONG64)(*(((const unsigned char *)(&x))+j)))<<((7-j)*8)) #define PULL64(x) (B(x,0)|B(x,1)|B(x,2)|B(x,3)|B(x,4)|B(x,5)|B(x,6)|B(x,7)) #endif |