* [PATCH] selftests/memfd: fix mfd_fail_open() to pass in buf to printf
@ 2014-09-04 15:07 Shuah Khan
[not found] ` <1409843242-6596-1-git-send-email-shuahkh-JPH+aEBZ4P+UEJcrhfAQsw@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Shuah Khan @ 2014-09-04 15:07 UTC (permalink / raw)
To: dh.herrmann-Re5JQEeQqe8AvxtiuMwx3w,
akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b,
bobby.prani-Re5JQEeQqe8AvxtiuMwx3w, hughd-hpIqsD4AKlfQT0dZR+AlfA
Cc: Shuah Khan, linux-api-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA
mfd_fail_open() doesn't pass in the buffer to printf resulting
in the following warning:
memfd_test.c: In function ‘mfd_fail_open’:
memfd_test.c:208:3: warning: format ‘%s’ expects a matching ‘char *’ argument [-Wformat=]
printf("open(%s) didn't fail as expected\n");
^
This change fixes the problem.
Signed-off-by: Shuah Khan <shuahkh-JPH+aEBZ4P+UEJcrhfAQsw@public.gmane.org>
---
tools/testing/selftests/memfd/memfd_test.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/memfd/memfd_test.c b/tools/testing/selftests/memfd/memfd_test.c
index cb5001b..0b9eafb 100644
--- a/tools/testing/selftests/memfd/memfd_test.c
+++ b/tools/testing/selftests/memfd/memfd_test.c
@@ -203,7 +203,7 @@ static void mfd_fail_open(int fd, int flags, mode_t mode)
sprintf(buf, "/proc/self/fd/%d", fd);
r = open(buf, flags, mode);
if (r >= 0) {
- printf("open(%s) didn't fail as expected\n");
+ printf("open(%s) didn't fail as expected\n", buf);
abort();
}
}
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread[parent not found: <1409843242-6596-1-git-send-email-shuahkh-JPH+aEBZ4P+UEJcrhfAQsw@public.gmane.org>]
* Re: [PATCH] selftests/memfd: fix mfd_fail_open() to pass in buf to printf [not found] ` <1409843242-6596-1-git-send-email-shuahkh-JPH+aEBZ4P+UEJcrhfAQsw@public.gmane.org> @ 2014-09-04 15:16 ` Pranith Kumar [not found] ` <CAJhHMCCuyC3HUfUktTpkQcxnqJDpA2O0Gqc8wZMq0TwB5PeY6w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 0 siblings, 1 reply; 3+ messages in thread From: Pranith Kumar @ 2014-09-04 15:16 UTC (permalink / raw) To: Shuah Khan Cc: David Herrmann, Andrew Morton, Hugh Dickins, open list:KERNEL SELFTEST F..., LKML On Thu, Sep 4, 2014 at 11:07 AM, Shuah Khan <shuahkh-JPH+aEBZ4P+UEJcrhfAQsw@public.gmane.org> wrote: > mfd_fail_open() doesn't pass in the buffer to printf resulting > in the following warning: > > memfd_test.c: In function ‘mfd_fail_open’: > memfd_test.c:208:3: warning: format ‘%s’ expects a matching ‘char *’ argument [-Wformat=] > printf("open(%s) didn't fail as expected\n"); > ^ > > This change fixes the problem. > > Signed-off-by: Shuah Khan <shuahkh-JPH+aEBZ4P+UEJcrhfAQsw@public.gmane.org> Hi Shuah, I already sent in a patch to fix this: https://lkml.org/lkml/2014/8/31/85 Can you please pick that up? Thanks! -- Pranith ^ permalink raw reply [flat|nested] 3+ messages in thread
[parent not found: <CAJhHMCCuyC3HUfUktTpkQcxnqJDpA2O0Gqc8wZMq0TwB5PeY6w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* Re: [PATCH] selftests/memfd: fix mfd_fail_open() to pass in buf to printf [not found] ` <CAJhHMCCuyC3HUfUktTpkQcxnqJDpA2O0Gqc8wZMq0TwB5PeY6w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> @ 2014-09-04 15:21 ` Shuah Khan 0 siblings, 0 replies; 3+ messages in thread From: Shuah Khan @ 2014-09-04 15:21 UTC (permalink / raw) To: Pranith Kumar Cc: David Herrmann, Andrew Morton, Hugh Dickins, open list:KERNEL SELFTEST F..., LKML On 09/04/2014 09:16 AM, Pranith Kumar wrote: > On Thu, Sep 4, 2014 at 11:07 AM, Shuah Khan <shuahkh-JPH+aEBZ4P+UEJcrhfAQsw@public.gmane.org> wrote: >> mfd_fail_open() doesn't pass in the buffer to printf resulting >> in the following warning: >> >> memfd_test.c: In function ‘mfd_fail_open’: >> memfd_test.c:208:3: warning: format ‘%s’ expects a matching ‘char *’ argument [-Wformat=] >> printf("open(%s) didn't fail as expected\n"); >> ^ >> >> This change fixes the problem. >> >> Signed-off-by: Shuah Khan <shuahkh-JPH+aEBZ4P+UEJcrhfAQsw@public.gmane.org> > > Hi Shuah, > > I already sent in a patch to fix this: > > https://lkml.org/lkml/2014/8/31/85 > > Can you please pick that up? Hi Pranith, Great. Could you please resend it to me cc'ing linux-api as well. thanks, -- Shuah -- Shuah Khan Sr. Linux Kernel Developer Samsung Research America (Silicon Valley) shuahkh-JPH+aEBZ4P+UEJcrhfAQsw@public.gmane.org | (970) 217-8978 ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-09-04 15:21 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-04 15:07 [PATCH] selftests/memfd: fix mfd_fail_open() to pass in buf to printf Shuah Khan
[not found] ` <1409843242-6596-1-git-send-email-shuahkh-JPH+aEBZ4P+UEJcrhfAQsw@public.gmane.org>
2014-09-04 15:16 ` Pranith Kumar
[not found] ` <CAJhHMCCuyC3HUfUktTpkQcxnqJDpA2O0Gqc8wZMq0TwB5PeY6w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-09-04 15:21 ` Shuah Khan
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox