libratbox/src/crypt.c: misc cleanup for compiler warning

crypt.c:1979:7: warning: '_STRING_ARCH_unaligned' is not defined,
                evaluates to 0 [-Wundef]
This commit is contained in:
Aaron Jones 2017-07-31 06:34:03 +00:00
parent e55c29ef11
commit 85f46bb59e
No known key found for this signature in database
GPG key ID: 8AF0737488AB3012

View file

@ -1947,6 +1947,9 @@ static void *rb_sha512_finish_ctx(struct sha512_ctx *ctx, void *resbuf)
return resbuf; return resbuf;
} }
#ifndef _STRING_ARCH_unaligned
#define _STRING_ARCH_unaligned 0
#endif
static void rb_sha512_process_bytes(const void *buffer, size_t len, struct sha512_ctx *ctx) static void rb_sha512_process_bytes(const void *buffer, size_t len, struct sha512_ctx *ctx)
{ {
@ -1976,7 +1979,7 @@ static void rb_sha512_process_bytes(const void *buffer, size_t len, struct sha51
/* Process available complete blocks. */ /* Process available complete blocks. */
if (len >= 128) if (len >= 128)
{ {
#if !_STRING_ARCH_unaligned #if (!_STRING_ARCH_unaligned)
/* To check alignment gcc has an appropriate operator. Other /* To check alignment gcc has an appropriate operator. Other
compilers don't. */ compilers don't. */
# if __GNUC__ >= 2 # if __GNUC__ >= 2