Commit 5a2a00ffbaed132267ece61d9a623d76fee229df

Steffen Jaeckel 2014-10-14T14:37:17

fix compiler warning when compiling with "-mx32" option

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
diff --git a/bn_mp_get_long.c b/bn_mp_get_long.c
index 0bb17ff..08a82f6 100644
--- a/bn_mp_get_long.c
+++ b/bn_mp_get_long.c
@@ -30,10 +30,12 @@ unsigned long mp_get_long(mp_int * a)
 
   /* get most significant digit of result */
   res = DIGIT(a,i);
-   
+
+#if ULONG_MAX != 0xfffffffful || DIGIT_BIT < 32
   while (--i >= 0) {
     res = (res << DIGIT_BIT) | DIGIT(a,i);
   }
+#endif
   return res;
 }
 #endif