Skip to content

Commit

Permalink
ftrace/scripts: Fix incorrect use of sprintf in recordmcount
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
Colin Ian King authored and rostedt committed Jan 4, 2016
1 parent a50bd43 commit 713a3e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/recordmcount.c
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,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 */
Expand Down

0 comments on commit 713a3e4

Please sign in to comment.