mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] selftests/memfd: fix mfd_fail_open() to pass in buf to printf
@ 2014-09-04 15:07 Shuah Khan
  2014-09-04 15:16 ` Pranith Kumar
  0 siblings, 1 reply; 3+ messages in thread
From: Shuah Khan @ 2014-09-04 15:07 UTC (permalink / raw)
  To: dh.herrmann, akpm, bobby.prani, hughd; +Cc: Shuah Khan, linux-api, linux-kernel

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@osg.samsung.com>
---
 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	[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
2014-09-04 15:16 ` Pranith Kumar
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

all inboxes | Powered by JetHome®