diff --git a/avx.cc b/avx.cc index d33f8e5..89a6e88 100644 --- a/avx.cc +++ b/avx.cc @@ -102,7 +102,7 @@ std::string Avx::Avx256(int rounds) { x[2] = _mm256_mul_pd(minus_four, a[2]); x[3] = _mm256_mul_pd(minus_four, a[3]); } - for (int k = 1; k < 4; k++) { + for (int k = 0; k < 4; k++) { for (int i = 0; i < 4; i++) { if (gross_x[k][i] != gross_x[k][0]) { return "avx256 pd"; @@ -140,7 +140,7 @@ std::string Avx::Avx256FMA(int rounds) { x[2] = _mm256_mul_pd(minus_four, a[2]); x[3] = _mm256_mul_pd(minus_four, a[3]); } - for (int k = 1; k < 4; k++) { + for (int k = 0; k < 4; k++) { for (int i = 0; i < 4; i++) { if (gross_x[k][i] != gross_x[k][0]) { return "avx256 pd"; @@ -182,7 +182,7 @@ std::string Avx::Avx512(int rounds) { x[3] = _mm512_mul_pd(minus_four, a[3]); } - for (int k = 1; k < 4; k++) { + for (int k = 0; k < 4; k++) { for (int i = 0; i < 7; i++) { if (gross_x[k][i] != gross_x[k][0]) { return "avx512 pd"; diff --git a/cpu_check.cc b/cpu_check.cc index f250823..a2c2d5b 100644 --- a/cpu_check.cc +++ b/cpu_check.cc @@ -444,8 +444,9 @@ Worker::Choices Worker::MakeChoices(BufferSet *b) { Json("hash", c.hasher->Name()), ", ", Json("copy", MalignBuffer::ToString(c.copy_method)), ", ", Json("memset", c.use_repstos ? "rep;sto" : "memset"), ", ", - JsonBool("madvise", c.madvise), ", ", Json("size", c.buf_size), ", ", - Json("pid", pid_), ", ", Json("round", round_), ", ", c.hole.ToString()); + JsonBool("madvise", c.madvise), ", ", + Json("size", static_cast(c.buf_size)), ", ", Json("pid", pid_), + ", ", Json("round", round_), ", ", c.hole.ToString()); return c; } diff --git a/malign_buffer.cc b/malign_buffer.cc index 5845ffb..3c1a227 100644 --- a/malign_buffer.cc +++ b/malign_buffer.cc @@ -235,8 +235,8 @@ std::string MalignBuffer::Syndrome(const MalignBuffer &that) const { std::string MalignBuffer::CorruptionSyndrome(const MalignBuffer &that) const { std::stringstream s; if (size() != that.size()) { - s << Json("unequalSizeThis", size()) << ", " - << Json("unequalSizeThat", that.size()); + s << Json("unequalSizeThis", static_cast(size())) << ", " + << Json("unequalSizeThat", static_cast(that.size())); return s.str(); } bool failed_memcmp = memcmp(data(), that.data(), that.size()); diff --git a/malign_buffer.h b/malign_buffer.h index ceee77b..f8dda3c 100644 --- a/malign_buffer.h +++ b/malign_buffer.h @@ -28,8 +28,8 @@ class MalignBuffer { public: struct PunchedHole { std::string ToString() const; - size_t start = 0; - size_t length = 0; + uint64_t start = 0; + uint64_t length = 0; unsigned char v = 0x53; }; diff --git a/silkscreen.cc b/silkscreen.cc index d18fcc2..c475235 100644 --- a/silkscreen.cc +++ b/silkscreen.cc @@ -72,8 +72,8 @@ absl::Status Silkscreen::CheckMySlots(int tid, uint64_t round) const { const char v = *data(k); if (v == expected) continue; error_count++; - last_error = absl::StrCat(Json("position", k), ", ", Json("is", v), ", ", - Json("expected", expected)); + last_error = absl::StrCat(Json("position", static_cast(k)), ", ", + Json("is", v), ", ", Json("expected", expected)); } if (slot_count(tid) != slots_read) { last_error = absl::StrCat(Json("read", slots_read), ", ",