Skip to content

Commit 713a3e4

Browse files
Colin Ian Kingrostedt
Colin Ian King
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/[email protected] Cc: Li Bin <[email protected]> Cc: Russell King <[email protected]> Cc: Will Deacon <[email protected]> Cc: [email protected] # 2.6.37+ Signed-off-by: Colin Ian King <[email protected]> Signed-off-by: Steven Rostedt <[email protected]>
1 parent a50bd43 commit 713a3e4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/recordmcount.c

+1-1
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)