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

2017-11-09 Thread Shuah Khan
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); >^ > me

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

2017-11-07 Thread lei yang
I got the same warning even with ubuntu new distro, this patch fixed this issue. $ gcc --version gcc (Ubuntu 6.3.0-12ubuntu2) 6.3.0 20170406 Copyright (C) 2016 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANT

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

2017-11-06 Thread lei yang
On 2017年11月07日 07:46, Shuah Khan wrote: 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: %

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

2017-11-06 Thread Shuah Khan
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); >^ > me

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

2017-11-05 Thread Lei Yang
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_t