Browse Source

falcon/test_boolean: conversion warning

master
John M. Schanck 4 years ago
parent
commit
3773b71aa3
2 changed files with 4 additions and 4 deletions
  1. +2
    -2
      crypto_sign/falcon-1024/clean/fpr.h
  2. +2
    -2
      crypto_sign/falcon-512/clean/fpr.h

+ 2
- 2
crypto_sign/falcon-1024/clean/fpr.h View File

@@ -436,8 +436,8 @@ fpr_lt(fpr x, fpr y) {
*/
int cc0, cc1;

cc0 = ((*(int64_t *)&x - *(int64_t *)&y) >> 63) & 1;
cc1 = ((*(int64_t *)&y - *(int64_t *)&x) >> 63) & 1;
cc0 = (int)((*(int64_t *)&x - *(int64_t *)&y) >> 63) & 1;
cc1 = (int)((*(int64_t *)&y - *(int64_t *)&x) >> 63) & 1;
return cc0 ^ ((cc0 ^ cc1) & (int)((x & y) >> 63));
}



+ 2
- 2
crypto_sign/falcon-512/clean/fpr.h View File

@@ -436,8 +436,8 @@ fpr_lt(fpr x, fpr y) {
*/
int cc0, cc1;

cc0 = ((*(int64_t *)&x - *(int64_t *)&y) >> 63) & 1;
cc1 = ((*(int64_t *)&y - *(int64_t *)&x) >> 63) & 1;
cc0 = (int)((*(int64_t *)&x - *(int64_t *)&y) >> 63) & 1;
cc1 = (int)((*(int64_t *)&y - *(int64_t *)&x) >> 63) & 1;
return cc0 ^ ((cc0 ^ cc1) & (int)((x & y) >> 63));
}



Loading…
Cancel
Save