]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
userfaultfd: selftest: fix compiler warning
authorAlakesh Haloi <alakesh.haloi@gmail.com>
Mon, 27 May 2019 15:18:59 +0000 (15:18 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 25 Jun 2019 03:34:50 +0000 (11:34 +0800)
[ Upstream commit 98a13a8d253999cf25eb16d901c35fbd2a8455c4 ]

Fixes following compiler warning

userfaultfd.c: In function ‘usage’:
userfaultfd.c:126:2: warning: format not a string literal and no format
arguments [-Wformat-security]
  fprintf(stderr, examples);

Signed-off-by: Alakesh Haloi <alakesh.haloi@gmail.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Mike Rapoport <rppt@linux.ibm.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
tools/testing/selftests/vm/userfaultfd.c

index 5d1db824f73a9d2af38e6368d459330a48848336..b3e6497b080c2aed5d3370b2de91de6adaa61b63 100644 (file)
@@ -123,7 +123,7 @@ static void usage(void)
        fprintf(stderr, "Supported <test type>: anon, hugetlb, "
                "hugetlb_shared, shmem\n\n");
        fprintf(stderr, "Examples:\n\n");
-       fprintf(stderr, examples);
+       fprintf(stderr, "%s", examples);
        exit(1);
 }