diff options
author | Darren Tucker <dtucker@zip.com.au> | 2008-06-13 12:40:55 +1000 |
---|---|---|
committer | Darren Tucker <dtucker@zip.com.au> | 2008-06-13 12:40:55 +1000 |
commit | 2c91b28a6da35f2e499414f8f6585f4f11410935 (patch) | |
tree | 48ee25aa008f35a641983ef62098845d970bbe6e /umac.c | |
parent | 2c1eb82695ff4628ad61bc5a9e70fb9d7826446f (diff) | |
download | openssh-git-2c91b28a6da35f2e499414f8f6585f4f11410935.tar.gz |
- (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.
Diffstat (limited to 'umac.c')
-rw-r--r-- | umac.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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 */ |