Re: [PATCH] selftests: memfd_test.c: fix compilation warning.

From: Shuah Khan
Date: Thu Nov 09 2017 - 15:14:25 EST


On 11/05/2017 03:56 AM, Lei Yang wrote:
> Replace '%d' by '%zu' to fix the following compilation warning.
>
> memfd_test.c:517:3: warning: format â%dâ expects argument of
> type âintâ,but argument 2 has type âsize_tâ [-Wformat=]
> printf("malloc(%d) failed: %m\n", mfd_def_size * 8);
> ^
> memfd_test.c: In function âmfd_fail_grow_writeâ:
> memfd_test.c:537:3: warning: format â%dâ expects argument
> of type âintâ,but argument 2 has type âsize_tâ [-Wformat=]
> printf("malloc(%d) failed: %m\n", mfd_def_size * 8);
>
> Signed-off-by: Lei Yang <Lei.Yang@xxxxxxxxxxxxx>

Thanks for the patch. Applied to linux-kselftest next for 4.15-rc1

-- Shuah