Commit 3d5962c3 authored by Michael Hamburg's avatar Michael Hamburg

fix two warnings pointed out by Sofia Celi

parent 4e809c79
......@@ -205,7 +205,9 @@ API_NS(scalar_set_unsigned) (
unsigned int i = 0;
for (; i<sizeof(uint64_t)/sizeof(decaf_word_t); i++) {
out->limb[i] = w;
w >>= (sizeof(uint64_t) > sizeof(decaf_word_t)) ? 8*sizeof(decaf_word_t) : 0;
#if DECAF_WORD_BITS < 64
w >>= 8*sizeof(decaf_word_t);
#endif
}
}
......
......@@ -205,7 +205,9 @@ API_NS(scalar_set_unsigned) (
unsigned int i = 0;
for (; i<sizeof(uint64_t)/sizeof(decaf_word_t); i++) {
out->limb[i] = w;
w >>= (sizeof(uint64_t) > sizeof(decaf_word_t)) ? 8*sizeof(decaf_word_t) : 0;
#if DECAF_WORD_BITS < 64
w >>= 8*sizeof(decaf_word_t);
#endif
}
}
......
......@@ -194,7 +194,9 @@ API_NS(scalar_set_unsigned) (
unsigned int i = 0;
for (; i<sizeof(uint64_t)/sizeof(decaf_word_t); i++) {
out->limb[i] = w;
w >>= (sizeof(uint64_t) > sizeof(decaf_word_t)) ? 8*sizeof(decaf_word_t) : 0;
#if DECAF_WORD_BITS < 64
w >>= 8*sizeof(decaf_word_t);
#endif
}
}
......
......@@ -45,6 +45,7 @@ static void get_cpu_entropy(uint8_t *entropy, size_t len) {
#else
__asm__("cpuid" : "=a"(a), "=b"(b), "=c"(c), "=d"(d) : "0"(1));
#endif
(void)a; (void)b; (void)d;
have_rdrand = (c>>30)&1;
tested = 1;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment