From c694c610fb2c981b1867d9f24e732235e1755d83 Mon Sep 17 00:00:00 2001 From: dtucker Date: Fri, 13 Jun 2008 02:40:55 +0000 Subject: [PATCH] - (dtucker) [umac.c] STORE_UINT32_REVERSED and endian_convert are never used on big endian machines, so ifdef them for little endian only to prevent unused function warnings. --- ChangeLog | 3 +++ umac.c | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index bce3ccda..570aad33 100644 --- a/ChangeLog +++ b/ChangeLog @@ -160,6 +160,9 @@ from Todd Vierling. - (dtucker) [auth-sia.c] Bug #1241: support password expiry on Tru64 SIA systems. Patch from R. Scott Bailey. + - (dtucker) [umac.c] STORE_UINT32_REVERSED and endian_convert are never used + on big endian machines, so ifdef them for little-endian only to prevent + unused function warnings on big-endians. 20080611 - (djm) [channels.c configure.ac] diff --git a/umac.c b/umac.c index 6b5a0058..1eba663c 100644 --- a/umac.c +++ b/umac.c @@ -136,12 +136,14 @@ static UINT32 LOAD_UINT32_REVERSED(void *ptr) return (UINT32)temp; } +# if (__LITTLE_ENDIAN__) static void STORE_UINT32_REVERSED(void *ptr, UINT32 x) { UINT32 i = (UINT32)x; *(UINT32 *)ptr = (i >> 24) | ((i & 0x00FF0000) >> 8 ) | ((i & 0x0000FF00) << 8 ) | (i << 24); } +# endif /* __LITTLE_ENDIAN */ #endif /* HAVE_SWAP32 */ /* The following definitions use the above reversal-primitives to do the right @@ -544,6 +546,7 @@ static void nh_transform(nh_ctx *hc, UINT8 *buf, UINT32 nbytes) /* ---------------------------------------------------------------------- */ +#if (__LITTLE_ENDIAN__) static void endian_convert(void *buf, UWORD bpw, UINT32 num_bytes) /* We endian convert the keys on little-endian computers to */ /* compensate for the lack of big-endian memory reads during hashing. */ @@ -566,7 +569,6 @@ static void endian_convert(void *buf, UWORD bpw, UINT32 num_bytes) } while (--iters); } } -#if (__LITTLE_ENDIAN__) #define endian_convert_if_le(x,y,z) endian_convert((x),(y),(z)) #else #define endian_convert_if_le(x,y,z) do{}while(0) /* Do nothing */ -- 2.45.1