summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2008-06-13 12:40:55 +1000
committerDarren Tucker <dtucker@zip.com.au>2008-06-13 12:40:55 +1000
commit2c91b28a6da35f2e499414f8f6585f4f11410935 (patch)
tree48ee25aa008f35a641983ef62098845d970bbe6e
parent2c1eb82695ff4628ad61bc5a9e70fb9d7826446f (diff)
- (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.
-rw-r--r--ChangeLog5
-rw-r--r--umac.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 3f19923c8..91caab88f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -160,6 +160,9 @@
160 from Todd Vierling. 160 from Todd Vierling.
161 - (dtucker) [auth-sia.c] Bug #1241: support password expiry on Tru64 SIA 161 - (dtucker) [auth-sia.c] Bug #1241: support password expiry on Tru64 SIA
162 systems. Patch from R. Scott Bailey. 162 systems. Patch from R. Scott Bailey.
163 - (dtucker) [umac.c] STORE_UINT32_REVERSED and endian_convert are never used
164 on big endian machines, so ifdef them for little-endian only to prevent
165 unused function warnings on big-endians.
163 166
16420080611 16720080611
165 - (djm) [channels.c configure.ac] 168 - (djm) [channels.c configure.ac]
@@ -4322,4 +4325,4 @@
4322 OpenServer 6 and add osr5bigcrypt support so when someone migrates 4325 OpenServer 6 and add osr5bigcrypt support so when someone migrates
4323 passwords between UnixWare and OpenServer they will still work. OK dtucker@ 4326 passwords between UnixWare and OpenServer they will still work. OK dtucker@
4324 4327
4325$Id: ChangeLog,v 1.4999 2008/06/13 01:13:13 dtucker Exp $ 4328$Id: ChangeLog,v 1.5000 2008/06/13 02:40:55 dtucker Exp $
diff --git a/umac.c b/umac.c
index 6b5a00585..1eba663c0 100644
--- a/umac.c
+++ b/umac.c
@@ -136,12 +136,14 @@ static UINT32 LOAD_UINT32_REVERSED(void *ptr)
136 return (UINT32)temp; 136 return (UINT32)temp;
137} 137}
138 138
139# if (__LITTLE_ENDIAN__)
139static void STORE_UINT32_REVERSED(void *ptr, UINT32 x) 140static void STORE_UINT32_REVERSED(void *ptr, UINT32 x)
140{ 141{
141 UINT32 i = (UINT32)x; 142 UINT32 i = (UINT32)x;
142 *(UINT32 *)ptr = (i >> 24) | ((i & 0x00FF0000) >> 8 ) 143 *(UINT32 *)ptr = (i >> 24) | ((i & 0x00FF0000) >> 8 )
143 | ((i & 0x0000FF00) << 8 ) | (i << 24); 144 | ((i & 0x0000FF00) << 8 ) | (i << 24);
144} 145}
146# endif /* __LITTLE_ENDIAN */
145#endif /* HAVE_SWAP32 */ 147#endif /* HAVE_SWAP32 */
146 148
147/* The following definitions use the above reversal-primitives to do the right 149/* 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)
544 546
545/* ---------------------------------------------------------------------- */ 547/* ---------------------------------------------------------------------- */
546 548
549#if (__LITTLE_ENDIAN__)
547static void endian_convert(void *buf, UWORD bpw, UINT32 num_bytes) 550static void endian_convert(void *buf, UWORD bpw, UINT32 num_bytes)
548/* We endian convert the keys on little-endian computers to */ 551/* We endian convert the keys on little-endian computers to */
549/* compensate for the lack of big-endian memory reads during hashing. */ 552/* 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)
566 } while (--iters); 569 } while (--iters);
567 } 570 }
568} 571}
569#if (__LITTLE_ENDIAN__)
570#define endian_convert_if_le(x,y,z) endian_convert((x),(y),(z)) 572#define endian_convert_if_le(x,y,z) endian_convert((x),(y),(z))
571#else 573#else
572#define endian_convert_if_le(x,y,z) do{}while(0) /* Do nothing */ 574#define endian_convert_if_le(x,y,z) do{}while(0) /* Do nothing */