From: Zhang Yaqi <zhangyaqi@xxxxxxxxxx> when compiling after make cd tests/nsm_client make nsm_client then it shows: nsm_client.c: In function hex2bin: nsm_client.c:104:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] nsm_client.c: In function bin2hex: nsm_client.c:122:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] Signed-off-by: Zhang Yaqi <zhangyaqi@xxxxxxxxxx> --- tests/nsm_client/nsm_client.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/nsm_client/nsm_client.c b/tests/nsm_client/nsm_client.c index 8dc05917..d34be1b2 100644 --- a/tests/nsm_client/nsm_client.c +++ b/tests/nsm_client/nsm_client.c @@ -98,7 +98,7 @@ usage(char *program) static int hex2bin(char *dst, size_t dstlen, char *src) { - int i; + size_t i; unsigned int tmp; for (i = 0; *src && i < dstlen; i++) { @@ -117,7 +117,7 @@ hex2bin(char *dst, size_t dstlen, char *src) static void bin2hex(char *dst, char *src, size_t srclen) { - int i; + size_t i; for (i = 0; i < srclen; i++) dst += sprintf(dst, "%02x", 0xff & src[i]); -- 2.27.0