From 42b0fb05adc42988962212c8feadd074139ae0f7 Mon Sep 17 00:00:00 2001 From: MITSUNARI Shigeo Date: Wed, 10 Jun 2020 14:13:51 +0900 Subject: [PATCH] remove vc warnings --- include/mcl/ec.hpp | 10 +++++----- include/mcl/mapto_wb19.hpp | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/include/mcl/ec.hpp b/include/mcl/ec.hpp index ce23f5b..d7d1b8e 100644 --- a/include/mcl/ec.hpp +++ b/include/mcl/ec.hpp @@ -116,7 +116,7 @@ void mul1CT(G& Q, const G& P, const mpz_class& x) } } } - mcl::FixedArray vTbl[splitN]; + mcl::FixedArray vTbl[splitN]; size_t bitSizeTbl[splitN]; size_t maxBitSize = 0; for (size_t i = 0; i < splitN; i++) { @@ -126,18 +126,18 @@ void mul1CT(G& Q, const G& P, const mpz_class& x) maxBitSize = bitSize; } } - int loopN = (maxBitSize + w - 1) / w; + size_t loopN = (maxBitSize + w - 1) / w; for (int i = 0; i < splitN; i++) { fp::ArrayIterator itr(gmp::getUnit(u[i]), bitSizeTbl[i], w); bool b = vTbl[i].resize(loopN); assert(b); (void)b; - for (int j = 0; j < loopN; j++) { - vTbl[i][loopN - 1 - j] = itr.getNext(); + for (size_t j = 0; j < loopN; j++) { + vTbl[i][loopN - 1 - j] = (uint8_t)itr.getNext(); } } Q.clear(); - for (int k = 0; k < loopN; k++) { + for (size_t k = 0; k < loopN; k++) { for (size_t i = 0; i < w; i++) { G::dbl(Q, Q); } diff --git a/include/mcl/mapto_wb19.hpp b/include/mcl/mapto_wb19.hpp index 6b353bc..dd11e09 100644 --- a/include/mcl/mapto_wb19.hpp +++ b/include/mcl/mapto_wb19.hpp @@ -81,9 +81,9 @@ struct MapToG2_WB19 { Fp2 ynum[4]; Fp2 yden[4]; int draftVersion_; - void setDraftVersion(int version) + void setDraftVersion(int draftVersion) { - draftVersion_ = version; + draftVersion_ = draftVersion; } void init() {