From 033fc066f386c4af854f8fad0adb2933fdbee662 Mon Sep 17 00:00:00 2001 From: Tim Burke Date: Mon, 25 Oct 2021 21:49:40 -0700 Subject: Clean up compile warning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Previously, compiling would complain warning: comparison of integer expressions of different signedness: ‘int’ and ‘uint32_t’ Change-Id: Ic839ab02189103975985fc0557d6846052635b14 --- src/c/pyeclib_c/pyeclib_c.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/c/pyeclib_c/pyeclib_c.c b/src/c/pyeclib_c/pyeclib_c.c index 1968b80..3184b34 100644 --- a/src/c/pyeclib_c/pyeclib_c.c +++ b/src/c/pyeclib_c/pyeclib_c.c @@ -989,15 +989,15 @@ hex_encode_string(char *buf, uint32_t buf_len) { char *hex_encoded_buf = (char*)alloc_zeroed_buffer((buf_len * 2) + 1); char *hex_encoded_ptr = hex_encoded_buf; - int i; + uint32_t i; for (i = 0; i < buf_len; i++) { - hex_encoded_ptr += sprintf(hex_encoded_ptr, "%.2x", (unsigned char)buf[i]); + hex_encoded_ptr += sprintf(hex_encoded_ptr, "%.2x", (unsigned char)buf[i]); } hex_encoded_buf[buf_len * 2] = 0; - - return hex_encoded_buf; + + return hex_encoded_buf; } static PyObject* -- cgit v1.2.1