Re: [PATCH] tests/nsm_client: Fix nsm_client compile warnings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 16 Jul 2024, at 22:26, 597607025@xxxxxx wrote:

> 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]
>   for (i = 0; *src && i < dstlen; i++) {
>                         ^
> nsm_client.c: In function bin2hex:
> nsm_client.c:122:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
>   for (i = 0; i < srclen; i++)
>
> Signed-off-by: Zhang Yaqi <zhangyaqi@xxxxxxxxxx>

Why not just to make the types match, rather than cast?

Ben






[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux