NTRU Prime: more compiler warnings

Tento commit je obsažen v:
John M. Schanck 2020-09-01 15:56:45 -04:00 odevzdal Kris Kwiatkowski
rodič 09d3f1e1e6
revize 191aed977f
24 změnil soubory, kde provedl 39 přidání a 75 odebrání

Zobrazit soubor

@ -29,10 +29,6 @@ static inline __m256i signedshiftrightconst(__m256i x, int16 y) {
return _mm256_srai_epi16(x, y);
}
static inline __m256i addconst(__m256i x, int16 y) {
return add(x, _mm256_set1_epi16(y));
}
static inline __m256i subconst(__m256i x, int16 y) {
return sub(x, _mm256_set1_epi16(y));
}

Zobrazit soubor

@ -61,5 +61,5 @@ void PQCLEAN_NTRULPR653_AVX2_crypto_decode_653x3(void *v, const unsigned char *s
nextf += 128;
}
*f = ((uint8)(*s & 3)) - 1;
*f = (uint8) ((*s & 3) - 1);
}

Zobrazit soubor

@ -11,14 +11,14 @@ void PQCLEAN_NTRULPR653_CLEAN_crypto_decode_653x3(void *v, const unsigned char *
for (i = 0; i < p / 4; ++i) {
x = *s++;
*f++ = ((uint8)(x & 3)) - 1;
*f++ = (uint8) ((x & 3) - 1);
x >>= 2;
*f++ = ((uint8)(x & 3)) - 1;
*f++ = (uint8) ((x & 3) - 1);
x >>= 2;
*f++ = ((uint8)(x & 3)) - 1;
*f++ = (uint8) ((x & 3) - 1);
x >>= 2;
*f++ = ((uint8)(x & 3)) - 1;
*f++ = (uint8) ((x & 3) - 1);
}
x = *s++;
*f++ = ((uint8)(x & 3)) - 1;
*f++ = (uint8) ((x & 3) - 1);
}

Zobrazit soubor

@ -29,10 +29,6 @@ static inline __m256i signedshiftrightconst(__m256i x, int16 y) {
return _mm256_srai_epi16(x, y);
}
static inline __m256i addconst(__m256i x, int16 y) {
return add(x, _mm256_set1_epi16(y));
}
static inline __m256i subconst(__m256i x, int16 y) {
return sub(x, _mm256_set1_epi16(y));
}

Zobrazit soubor

@ -61,5 +61,5 @@ void PQCLEAN_NTRULPR761_AVX2_crypto_decode_761x3(void *v, const unsigned char *s
nextf += 128;
}
*f = ((uint8)(*s & 3)) - 1;
*f = (uint8) ((*s & 3) - 1);
}

Zobrazit soubor

@ -11,14 +11,14 @@ void PQCLEAN_NTRULPR761_CLEAN_crypto_decode_761x3(void *v, const unsigned char *
for (i = 0; i < p / 4; ++i) {
x = *s++;
*f++ = ((uint8)(x & 3)) - 1;
*f++ = (uint8) ((x & 3) - 1);
x >>= 2;
*f++ = ((uint8)(x & 3)) - 1;
*f++ = (uint8) ((x & 3) - 1);
x >>= 2;
*f++ = ((uint8)(x & 3)) - 1;
*f++ = (uint8) ((x & 3) - 1);
x >>= 2;
*f++ = ((uint8)(x & 3)) - 1;
*f++ = (uint8) ((x & 3) - 1);
}
x = *s++;
*f++ = ((uint8)(x & 3)) - 1;
*f++ = (uint8) ((x & 3) - 1);
}

Zobrazit soubor

@ -29,10 +29,6 @@ static inline __m256i signedshiftrightconst(__m256i x, int16 y) {
return _mm256_srai_epi16(x, y);
}
static inline __m256i addconst(__m256i x, int16 y) {
return add(x, _mm256_set1_epi16(y));
}
static inline __m256i subconst(__m256i x, int16 y) {
return sub(x, _mm256_set1_epi16(y));
}

Zobrazit soubor

@ -61,5 +61,5 @@ void PQCLEAN_NTRULPR857_AVX2_crypto_decode_857x3(void *v, const unsigned char *s
nextf += 128;
}
*f = ((uint8)(*s & 3)) - 1;
*f = (uint8) ((*s & 3) - 1);
}

Zobrazit soubor

@ -11,14 +11,14 @@ void PQCLEAN_NTRULPR857_CLEAN_crypto_decode_857x3(void *v, const unsigned char *
for (i = 0; i < p / 4; ++i) {
x = *s++;
*f++ = ((uint8)(x & 3)) - 1;
*f++ = (uint8) ((x & 3) - 1);
x >>= 2;
*f++ = ((uint8)(x & 3)) - 1;
*f++ = (uint8) ((x & 3) - 1);
x >>= 2;
*f++ = ((uint8)(x & 3)) - 1;
*f++ = (uint8) ((x & 3) - 1);
x >>= 2;
*f++ = ((uint8)(x & 3)) - 1;
*f++ = (uint8) ((x & 3) - 1);
}
x = *s++;
*f++ = ((uint8)(x & 3)) - 1;
*f++ = (uint8) ((x & 3) - 1);
}

Zobrazit soubor

@ -241,7 +241,7 @@ int PQCLEAN_SNTRUP653_AVX2_crypto_core_mult3sntrup653(unsigned char *outbytes, c
mult768(fg, f, g);
fg[0] -= fg[p - 1];
fg[0] = (int16) (fg[0] - fg[p - 1]);
for (i = 0; i < 768; i += 16) {
int16x16 fgi = load_x16(&fg[i]);
int16x16 fgip = load_x16(&fg[i + p]);

Zobrazit soubor

@ -29,10 +29,6 @@ static inline __m256i signedshiftrightconst(__m256i x, int16 y) {
return _mm256_srai_epi16(x, y);
}
static inline __m256i addconst(__m256i x, int16 y) {
return add(x, _mm256_set1_epi16(y));
}
static inline __m256i subconst(__m256i x, int16 y) {
return sub(x, _mm256_set1_epi16(y));
}

Zobrazit soubor

@ -61,5 +61,5 @@ void PQCLEAN_SNTRUP653_AVX2_crypto_decode_653x3(void *v, const unsigned char *s)
nextf += 128;
}
*f = ((uint8)(*s & 3)) - 1;
*f = (uint8) ((*s & 3) - 1);
}

Zobrazit soubor

@ -29,10 +29,6 @@ static inline __m256i signedshiftrightconst(__m256i x, int16 y) {
return _mm256_srai_epi16(x, y);
}
static inline __m256i addconst(__m256i x, int16 y) {
return add(x, _mm256_set1_epi16(y));
}
static inline __m256i subconst(__m256i x, int16 y) {
return sub(x, _mm256_set1_epi16(y));
}

Zobrazit soubor

@ -11,14 +11,14 @@ void PQCLEAN_SNTRUP653_CLEAN_crypto_decode_653x3(void *v, const unsigned char *s
for (i = 0; i < p / 4; ++i) {
x = *s++;
*f++ = ((uint8)(x & 3)) - 1;
*f++ = (uint8) ((x & 3) - 1);
x >>= 2;
*f++ = ((uint8)(x & 3)) - 1;
*f++ = (uint8) ((x & 3) - 1);
x >>= 2;
*f++ = ((uint8)(x & 3)) - 1;
*f++ = (uint8) ((x & 3) - 1);
x >>= 2;
*f++ = ((uint8)(x & 3)) - 1;
*f++ = (uint8) ((x & 3) - 1);
}
x = *s++;
*f++ = ((uint8)(x & 3)) - 1;
*f++ = (uint8) ((x & 3) - 1);
}

Zobrazit soubor

@ -241,7 +241,7 @@ int PQCLEAN_SNTRUP761_AVX2_crypto_core_mult3sntrup761(unsigned char *outbytes, c
mult768(fg, f, g);
fg[0] -= fg[p - 1];
fg[0] = (int16) (fg[0] - fg[p - 1]);
for (i = 0; i < 768; i += 16) {
int16x16 fgi = load_x16(&fg[i]);
int16x16 fgip = load_x16(&fg[i + p]);

Zobrazit soubor

@ -29,10 +29,6 @@ static inline __m256i signedshiftrightconst(__m256i x, int16 y) {
return _mm256_srai_epi16(x, y);
}
static inline __m256i addconst(__m256i x, int16 y) {
return add(x, _mm256_set1_epi16(y));
}
static inline __m256i subconst(__m256i x, int16 y) {
return sub(x, _mm256_set1_epi16(y));
}

Zobrazit soubor

@ -61,5 +61,5 @@ void PQCLEAN_SNTRUP761_AVX2_crypto_decode_761x3(void *v, const unsigned char *s)
nextf += 128;
}
*f = ((uint8)(*s & 3)) - 1;
*f = (uint8) ((*s & 3) - 1);
}

Zobrazit soubor

@ -29,10 +29,6 @@ static inline __m256i signedshiftrightconst(__m256i x, int16 y) {
return _mm256_srai_epi16(x, y);
}
static inline __m256i addconst(__m256i x, int16 y) {
return add(x, _mm256_set1_epi16(y));
}
static inline __m256i subconst(__m256i x, int16 y) {
return sub(x, _mm256_set1_epi16(y));
}

Zobrazit soubor

@ -11,14 +11,14 @@ void PQCLEAN_SNTRUP761_CLEAN_crypto_decode_761x3(void *v, const unsigned char *s
for (i = 0; i < p / 4; ++i) {
x = *s++;
*f++ = ((uint8)(x & 3)) - 1;
*f++ = (uint8) ((x & 3) - 1);
x >>= 2;
*f++ = ((uint8)(x & 3)) - 1;
*f++ = (uint8) ((x & 3) - 1);
x >>= 2;
*f++ = ((uint8)(x & 3)) - 1;
*f++ = (uint8) ((x & 3) - 1);
x >>= 2;
*f++ = ((uint8)(x & 3)) - 1;
*f++ = (uint8) ((x & 3) - 1);
}
x = *s++;
*f++ = ((uint8)(x & 3)) - 1;
*f++ = (uint8) ((x & 3) - 1);
}

Zobrazit soubor

@ -278,7 +278,7 @@ int PQCLEAN_SNTRUP857_AVX2_crypto_core_mult3sntrup857(unsigned char *outbytes, c
mult1024(fg, f, g);
fg[0] -= fg[p - 1];
fg[0] = (int16) (fg[0] - fg[p - 1]);
for (i = 0; i < 1024; i += 16) {
int16x16 fgi = load_x16(&fg[i]);
int16x16 fgip = load_x16(&fg[i + p]);

Zobrazit soubor

@ -29,10 +29,6 @@ static inline __m256i signedshiftrightconst(__m256i x, int16 y) {
return _mm256_srai_epi16(x, y);
}
static inline __m256i addconst(__m256i x, int16 y) {
return add(x, _mm256_set1_epi16(y));
}
static inline __m256i subconst(__m256i x, int16 y) {
return sub(x, _mm256_set1_epi16(y));
}

Zobrazit soubor

@ -61,5 +61,5 @@ void PQCLEAN_SNTRUP857_AVX2_crypto_decode_857x3(void *v, const unsigned char *s)
nextf += 128;
}
*f = ((uint8)(*s & 3)) - 1;
*f = (uint8) ((*s & 3) - 1);
}

Zobrazit soubor

@ -29,10 +29,6 @@ static inline __m256i signedshiftrightconst(__m256i x, int16 y) {
return _mm256_srai_epi16(x, y);
}
static inline __m256i addconst(__m256i x, int16 y) {
return add(x, _mm256_set1_epi16(y));
}
static inline __m256i subconst(__m256i x, int16 y) {
return sub(x, _mm256_set1_epi16(y));
}

Zobrazit soubor

@ -11,14 +11,14 @@ void PQCLEAN_SNTRUP857_CLEAN_crypto_decode_857x3(void *v, const unsigned char *s
for (i = 0; i < p / 4; ++i) {
x = *s++;
*f++ = ((uint8)(x & 3)) - 1;
*f++ = (uint8) ((x & 3) - 1);
x >>= 2;
*f++ = ((uint8)(x & 3)) - 1;
*f++ = (uint8) ((x & 3) - 1);
x >>= 2;
*f++ = ((uint8)(x & 3)) - 1;
*f++ = (uint8) ((x & 3) - 1);
x >>= 2;
*f++ = ((uint8)(x & 3)) - 1;
*f++ = (uint8) ((x & 3) - 1);
}
x = *s++;
*f++ = ((uint8)(x & 3)) - 1;
*f++ = (uint8) ((x & 3) - 1);
}