Skip to content

Commit 713a3e4

Browse files
Colin Ian Kingrostedt
authored andcommitted
ftrace/scripts: Fix incorrect use of sprintf in recordmcount
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: a50bd43 ("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> Cc: stable@vger.kernel.org # 2.6.37+ Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
1 parent a50bd43 commit 713a3e4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

scripts/recordmcount.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -586,7 +586,7 @@ main(int argc, char *argv[])
586586
do_file(file);
587587
break;
588588
case SJ_FAIL: /* error in do_file or below */
589-
sprintf("%s: failed\n", file);
589+
fprintf(stderr, "%s: failed\n", file);
590590
++n_error;
591591
break;
592592
case SJ_SUCCEED: /* premature success */

0 commit comments

Comments
 (0)