From bdb42f191106115c38984f1f1a5fc1e815b65b38 Mon Sep 17 00:00:00 2001 From: Thom Wiggers Date: Fri, 20 Sep 2019 10:39:42 +0200 Subject: [PATCH 1/2] Allow to automatically merge PRs if approved and CI agrees (#234) --- .mergify.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .mergify.yml diff --git a/.mergify.yml b/.mergify.yml new file mode 100644 index 00000000..d60d32b4 --- /dev/null +++ b/.mergify.yml @@ -0,0 +1,14 @@ +pull_request_rules: + - name: Automatic merge + conditions: + - base=master + - "#approved-reviews-by>=1" + - "#changes-requested-reviews-by=0" + - status-success=Travis CI - Pull Request + - status-success=Travis CI - Branch + - status-success=continuous-integration/appveyor/branch + - status-success=continuous-integration/appveyor/pr + - status-success=build + actions: + merge: + strict: smart From 993803e02d75012efe04ca22cb2d1afefdf34fdc Mon Sep 17 00:00:00 2001 From: Thom Wiggers Date: Mon, 23 Sep 2019 17:16:58 +0200 Subject: [PATCH 2/2] Ignore pointless clang-tidy warning. (#237) * Ignore pointless clang-tidy warning. It wants you to write type suffixes for integers using uppercase. Let's just disable this warning. https://clang.llvm.org/extra/clang-tidy/checks/readability-uppercase-literal-suffix.html * Clean up bugprone-narrowing-conversion --- .clang-tidy | 2 +- crypto_sign/falcon-1024/clean/sign.c | 2 +- crypto_sign/falcon-512/clean/sign.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.clang-tidy b/.clang-tidy index d141fd9f..5189c670 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -1,5 +1,5 @@ --- -Checks: '*,-llvm-header-guard,-hicpp-*,-readability-function-size,-google-readability-todo,-readability-magic-numbers,-cppcoreguidelines-avoid-magic-numbers,-readability-isolate-declaration' +Checks: '*,-llvm-header-guard,-hicpp-*,-readability-function-size,-google-readability-todo,-readability-magic-numbers,-cppcoreguidelines-avoid-magic-numbers,-readability-isolate-declaration,-readability-uppercase-literal-suffix' WarningsAsErrors: '*' HeaderFilterRegex: '.*' AnalyzeTemporaryDtors: false diff --git a/crypto_sign/falcon-1024/clean/sign.c b/crypto_sign/falcon-1024/clean/sign.c index 9307206e..937d6163 100644 --- a/crypto_sign/falcon-1024/clean/sign.c +++ b/crypto_sign/falcon-1024/clean/sign.c @@ -953,7 +953,7 @@ sampler(void *ctx, fpr mu, fpr isigma) { * centered on 0. */ z0 = gaussian0_sampler(&spc->p); - b = prng_get_u8(&spc->p) & 1; + b = (int)prng_get_u8(&spc->p) & 1; z = b + ((b << 1) - 1) * z0; /* diff --git a/crypto_sign/falcon-512/clean/sign.c b/crypto_sign/falcon-512/clean/sign.c index 9fd0fc78..2b84aea5 100644 --- a/crypto_sign/falcon-512/clean/sign.c +++ b/crypto_sign/falcon-512/clean/sign.c @@ -953,7 +953,7 @@ sampler(void *ctx, fpr mu, fpr isigma) { * centered on 0. */ z0 = gaussian0_sampler(&spc->p); - b = prng_get_u8(&spc->p) & 1; + b = (int)prng_get_u8(&spc->p) & 1; z = b + ((b << 1) - 1) * z0; /*