[LTP] [PATCH 2/2] read_all: Fix type warnings

Li Wang liwang@redhat.com
Thu Jul 14 06:46:17 CEST 2022


On Tue, Jul 12, 2022 at 8:46 PM Richard Palethorpe via ltp <
ltp@lists.linux.it> wrote:

> Signed-off-by: Richard Palethorpe <rpalethorpe@suse.com>
>

Reviewed-by: Li Wang <liwang@redhat.com>


> ---
>  testcases/kernel/fs/read_all/read_all.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/testcases/kernel/fs/read_all/read_all.c
> b/testcases/kernel/fs/read_all/read_all.c
> index d8c68bd33..813991f2c 100644
> --- a/testcases/kernel/fs/read_all/read_all.c
> +++ b/testcases/kernel/fs/read_all/read_all.c
> @@ -168,7 +168,7 @@ static void sanitize_str(char *buf, ssize_t count)
>  {
>         int i;
>
> -       for (i = 0; i < MIN(count, MAX_DISPLAY); i++)
> +       for (i = 0; i < MIN(count, (ssize_t)MAX_DISPLAY); i++)
>                 if (!isprint(buf[i]))
>                         buf[i] = ' ';
>
> @@ -439,7 +439,7 @@ static void setup(void)
>                 tst_brk(TBROK, "The directory argument (-d) is required");
>
>         if (!worker_count)
> -               worker_count = MIN(MAX(tst_ncpus() - 1, 1), max_workers);
> +               worker_count = MIN(MAX(tst_ncpus() - 1, 1L), max_workers);
>         workers = SAFE_MALLOC(worker_count * sizeof(*workers));
>
>         if (tst_parse_int(str_worker_timeout, &worker_timeout, 1,
> INT_MAX)) {
> --
> 2.36.1
>
>
> --
> Mailing list info: https://lists.linux.it/listinfo/ltp
>
>

-- 
Regards,
Li Wang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linux.it/pipermail/ltp/attachments/20220714/07209e6c/attachment.htm>


More information about the ltp mailing list