From: Mike Rapoport <rppt@linux.ibm.com>
To: Alakesh Haloi <alakesh.haloi@gmail.com>
Cc: linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org,
Peter Xu <peterx@redhat.com>,
Andrew Morton <akpm@linux-foundation.org>,
Mike Rapoport <rppt@linux.vnet.ibm.com>,
Shuah Khan <shuah@kernel.org>
Subject: Re: [PATCH] userfaultfd: selftest: fix compiler warning
Date: Tue, 28 May 2019 08:33:55 +0300 [thread overview]
Message-ID: <20190528053355.GB5055@rapoport-lnx> (raw)
In-Reply-To: <20190527151859.GA3217@ip-172-31-44-144.us-west-2.compute.internal>
On Mon, May 27, 2019 at 03:18:59PM +0000, Alakesh Haloi wrote:
> 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: Mike Rapoport <rppt@linux.ibm.com>
> ---
> tools/testing/selftests/vm/userfaultfd.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/testing/selftests/vm/userfaultfd.c b/tools/testing/selftests/vm/userfaultfd.c
> index 5d1db824f73a..b3e6497b080c 100644
> --- a/tools/testing/selftests/vm/userfaultfd.c
> +++ b/tools/testing/selftests/vm/userfaultfd.c
> @@ -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);
> }
>
> --
> 2.17.1
>
--
Sincerely yours,
Mike.
prev parent reply other threads:[~2019-05-28 5:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-27 15:18 Alakesh Haloi
2019-05-28 2:17 ` Peter Xu
2019-05-28 5:33 ` Mike Rapoport [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190528053355.GB5055@rapoport-lnx \
--to=rppt@linux.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=alakesh.haloi@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=peterx@redhat.com \
--cc=rppt@linux.vnet.ibm.com \
--cc=shuah@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®