Browse Source

fix two warnings pointed out by Sofia Celi

master
Michael Hamburg 7 years ago
parent
commit
3d5962c330
4 changed files with 10 additions and 3 deletions
  1. +3
    -1
      src/GENERATED/c/curve25519/scalar.c
  2. +3
    -1
      src/GENERATED/c/ed448goldilocks/scalar.c
  3. +3
    -1
      src/per_curve/scalar.tmpl.c
  4. +1
    -0
      src/spongerng.c

+ 3
- 1
src/GENERATED/c/curve25519/scalar.c View File

@@ -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
}
}



+ 3
- 1
src/GENERATED/c/ed448goldilocks/scalar.c View File

@@ -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
}
}



+ 3
- 1
src/per_curve/scalar.tmpl.c View File

@@ -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
}
}



+ 1
- 0
src/spongerng.c View File

@@ -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;
}


Loading…
Cancel
Save