From 2a89ca2874add29ddcae328e00b370197c503126 Mon Sep 17 00:00:00 2001 From: Joost Rijneveld Date: Thu, 19 Oct 2017 16:50:24 +0200 Subject: [PATCH] Resolve comparison warnings --- Makefile | 2 +- xmss_core_fast.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 3ce49a3..c3e2ae1 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ CC = /usr/bin/gcc -CFLAGS = -Wall -g -O3 -Wextra +CFLAGS = -Wall -g -O3 -Wextra -Wpedantic LDLIBS = -lcrypto -lm SOURCES = params.c hash.c fips202.c hash_address.c randombytes.c wots.c xmss.c xmss_core.c xmss_commons.c diff --git a/xmss_core_fast.c b/xmss_core_fast.c index d46a8c6..3d0c634 100644 --- a/xmss_core_fast.c +++ b/xmss_core_fast.c @@ -220,7 +220,7 @@ static char bds_state_update(const xmss_params *params, uint32_t node_addr[8]; uint32_t ots_addr[8]; - int nodeh; + unsigned int nodeh; int idx = state->next_leaf; if (idx == 1 << params->tree_height) { return 1; @@ -493,7 +493,7 @@ int xmssmt_core_keypair(const xmss_params *params, { unsigned char ots_seed[params->n]; uint32_t addr[8] = {0, 0, 0, 0, 0, 0, 0, 0}; - int i; + unsigned int i; // Set idx = 0 for (i = 0; i < params->index_len; i++) {