From 06e0c8df2f75ed474fb451952d10133d42c1e1df Mon Sep 17 00:00:00 2001 From: Kris Kwiatkowski Date: Sat, 8 Dec 2018 21:33:10 +0000 Subject: [PATCH] disco: Compare unsigned with unsigned Removes some warrning when building with -Wextra on RISC-V --- disco/src/tweetstrobe.c | 2 +- disco/tests/test_disco.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/disco/src/tweetstrobe.c b/disco/src/tweetstrobe.c index 02d078d..3a184f4 100644 --- a/disco/src/tweetstrobe.c +++ b/disco/src/tweetstrobe.c @@ -215,7 +215,7 @@ inline void strobe_clone(const strobe_s *src, strobe_s *dst) { */ void strobe_print(const strobe_s *strobe) { - for (int i = 0; i < sizeof(strobe->state); i++) { + for (size_t i = 0; i < sizeof(strobe->state); i++) { printf("%02x", strobe->state.b[i]); } printf("\n"); diff --git a/disco/tests/test_disco.c b/disco/tests/test_disco.c index 45312c2..4aabfa0 100644 --- a/disco/tests/test_disco.c +++ b/disco/tests/test_disco.c @@ -98,7 +98,7 @@ void test_NX() { // debug printf("sent %zu bytes\n", out_len); - for (int i = 0; i < out_len; i++) { + for (size_t i = 0; i < out_len; i++) { printf("%02x", out[i]); } printf("\n"); @@ -134,7 +134,7 @@ void test_NX() { // debug printf("sent %zu bytes:\n", out_len); - for (int i = 0; i < out_len; i++) { + for (size_t i = 0; i < out_len; i++) { printf("%02x", out[i]); } printf("\n"); @@ -215,7 +215,7 @@ void test_IK() { // debug printf("sent %zu bytes\n", out_len); - for (int i = 0; i < out_len; i++) { + for (size_t i = 0; i < out_len; i++) { printf("%02x", out[i]); } printf("\n"); @@ -251,7 +251,7 @@ void test_IK() { // debug printf("sent %zu bytes:\n", out_len); - for (int i = 0; i < out_len; i++) { + for (size_t i = 0; i < out_len; i++) { printf("%02x", out[i]); } printf("\n");