diff options
author | Nick Mathewson <nickm@torproject.org> | 2016-10-11 10:29:43 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2016-10-11 10:29:43 -0400 |
commit | 5a9696fad864406d7d65cc25e356c543957e596f (patch) | |
tree | d3672858fbc2acc6fc6a98b9ff4c0ce7d8820545 /src/ext/mulodi | |
parent | 7026b607a0b873ddbee16d5bd8ac2975c7092f5b (diff) | |
download | tor-5a9696fad864406d7d65cc25e356c543957e596f.tar.gz tor-5a9696fad864406d7d65cc25e356c543957e596f.zip |
Fix a new compilation warning with broken-mulodi i386 clang builds. :(
Diffstat (limited to 'src/ext/mulodi')
-rw-r--r-- | src/ext/mulodi/mulodi4.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/ext/mulodi/mulodi4.c b/src/ext/mulodi/mulodi4.c index bfa5e01295..9891bbf1af 100644 --- a/src/ext/mulodi/mulodi4.c +++ b/src/ext/mulodi/mulodi4.c @@ -17,6 +17,7 @@ #else #define COMPILER_RT_ABI #define di_int int64_t +#define di_uint uint64_t #include "torint.h" di_int __mulodi4(di_int a, di_int b, int* overflow); @@ -30,9 +31,9 @@ COMPILER_RT_ABI di_int __mulodi4(di_int a, di_int b, int* overflow) { const int N = (int)(sizeof(di_int) * CHAR_BIT); - const di_int MIN = (di_int)1 << (N-1); + const di_int MIN = (di_int) ((di_uint)1 << (N-1)); const di_int MAX = ~MIN; - *overflow = 0; + *overflow = 0; di_int result = a * b; if (a == MIN) { |