From 61ed40a618a541e62ed22273f711ca277fcbc86b Mon Sep 17 00:00:00 2001 From: anonimal Date: Fri, 22 Jul 2016 22:05:35 +0000 Subject: [PATCH] Tests: fix signed/unsigned comparison in hash-target * References #886 --- tests/hash-target.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/hash-target.cpp b/tests/hash-target.cpp index c46f6722..aeb6688b 100644 --- a/tests/hash-target.cpp +++ b/tests/hash-target.cpp @@ -41,7 +41,7 @@ using cryptonote::check_hash; int main(int argc, char *argv[]) { crypto::hash h; for (uint64_t diff = 1;; diff += 1 + (diff >> 8)) { - for (int b = 0; b < 256; b++) { + for (uint16_t b = 0; b < 256; b++) { memset(&h, b, sizeof(crypto::hash)); if (check_hash(h, diff) != (b == 0 || diff <= 255 / b)) { return 1;