]> andersk Git - openssh.git/commitdiff
- (dtucker) [umac.c] STORE_UINT32_REVERSED and endian_convert are never used
authordtucker <dtucker>
Fri, 13 Jun 2008 02:40:55 +0000 (02:40 +0000)
committerdtucker <dtucker>
Fri, 13 Jun 2008 02:40:55 +0000 (02:40 +0000)
    on big endian machines, so ifdef them for little endian only to prevent
    unused function warnings.

ChangeLog
umac.c

index bce3ccda350ef959a37e3c2881a7d3511b179eab..570aad3342acf192e625a8e8132b0b622506debf 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
     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 6b5a00585a0a5c4be5603b39c490822d93c9268e..1eba663c0cb733f0509c5e4537e647580ae90589 100644 (file)
--- 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 */
This page took 0.063599 seconds and 5 git commands to generate.