Message ID | tencent_A858F696592599629C0E743528247B763F07@qq.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | tests/nsm_client: Fix nsm_client compile warnings | expand |
diff --git a/tests/nsm_client/nsm_client.c b/tests/nsm_client/nsm_client.c index 8dc05917..67b593fa 100644 --- a/tests/nsm_client/nsm_client.c +++ b/tests/nsm_client/nsm_client.c @@ -101,7 +101,7 @@ hex2bin(char *dst, size_t dstlen, char *src) int i; unsigned int tmp; - for (i = 0; *src && i < dstlen; i++) { + for (i = 0; *src && (size_t)i < dstlen; i++) { if (sscanf(src, "%2x", &tmp) != 1) return 0; dst[i] = tmp; @@ -119,7 +119,7 @@ bin2hex(char *dst, char *src, size_t srclen) { int i; - for (i = 0; i < srclen; i++) + for (i = 0; (size_t)i < srclen; i++) dst += sprintf(dst, "%02x", 0xff & src[i]); }