diff options
author | Colin Ian King <colin.king@canonical.com> | 2015-12-31 02:06:41 +0300 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2016-01-23 00:40:09 +0300 |
commit | e02539e109eb34597cd9a92ae1842d2b2181696c (patch) | |
tree | 6e01e82ba2f43b00eacbc5e3cb7344a89042ad99 /scripts | |
parent | 18020036abfe56b51b08f2e337482ce8b2237eea (diff) | |
download | linux-e02539e109eb34597cd9a92ae1842d2b2181696c.tar.xz |
ftrace/scripts: Fix incorrect use of sprintf in recordmcount
commit 713a3e4de707fab49d5aa4bceb77db1058572a7b upstream.
Fix build warning:
scripts/recordmcount.c:589:4: warning: format not a string
literal and no format arguments [-Wformat-security]
sprintf("%s: failed\n", file);
Fixes: a50bd43935586 ("ftrace/scripts: Have recordmcount copy the object file")
Link: http://lkml.kernel.org/r/1451516801-16951-1-git-send-email-colin.king@canonical.com
Cc: Li Bin <huawei.libin@huawei.com>
Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/recordmcount.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/recordmcount.c b/scripts/recordmcount.c index 097037921d7b..0d5ae4a0f20c 100644 --- a/scripts/recordmcount.c +++ b/scripts/recordmcount.c @@ -546,7 +546,7 @@ main(int argc, char *argv[]) do_file(file); break; case SJ_FAIL: /* error in do_file or below */ - sprintf("%s: failed\n", file); + fprintf(stderr, "%s: failed\n", file); ++n_error; break; case SJ_SUCCEED: /* premature success */ |