From 49161e8d8b28b2fbdec25de53582922860dfd23c Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Fri, 17 May 2019 14:47:07 -0400 Subject: [PATCH] Update comments --- nbtheory.cpp | 6 ++++-- rw.cpp | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/nbtheory.cpp b/nbtheory.cpp index 310e6cb9..b7a50306 100644 --- a/nbtheory.cpp +++ b/nbtheory.cpp @@ -646,6 +646,7 @@ bool SolveModularQuadraticEquation(Integer &r1, Integer &r2, const Integer &a, c Integer ModularRoot(const Integer &a, const Integer &dp, const Integer &dq, const Integer &p, const Integer &q, const Integer &u) { + // GCC warning bug, https://stackoverflow.com/q/12842306/608639 #ifdef _OPENMP Integer p2, q2; #pragma omp parallel @@ -1003,10 +1004,10 @@ Integer Lucas(const Integer &n, const Integer &P, const Integer &modulus) Integer InverseLucas(const Integer &e, const Integer &m, const Integer &p, const Integer &q, const Integer &u) { - const Integer d = (m*m-4); + // GCC warning bug, https://stackoverflow.com/q/12842306/608639 #ifdef _OPENMP - Integer p2, q2; + Integer d = (m*m-4), p2, q2; #pragma omp parallel #pragma omp sections { @@ -1022,6 +1023,7 @@ Integer InverseLucas(const Integer &e, const Integer &m, const Integer &p, const } } #else + const Integer d = (m*m-4); const Integer t1 = p-Jacobi(d,p); const Integer p2 = Lucas(EuclideanMultiplicativeInverse(e,t1), m, p); diff --git a/rw.cpp b/rw.cpp index a2c72220..ab79358c 100644 --- a/rw.cpp +++ b/rw.cpp @@ -126,6 +126,7 @@ void InvertibleRWFunction::PrecomputeTweakedRoots() const { ModularArithmetic modp(m_p), modq(m_q); + // GCC warning bug, https://stackoverflow.com/q/12842306/608639 #ifdef _OPENMP #pragma omp parallel sections if(CRYPTOPP_RW_USE_OMP) {