From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754668AbbL3XGw (ORCPT ); Wed, 30 Dec 2015 18:06:52 -0500 Received: from youngberry.canonical.com ([91.189.89.112]:57381 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752171AbbL3XGu (ORCPT ); Wed, 30 Dec 2015 18:06:50 -0500 From: Colin King To: Steven Rostedt , Li Bin , Russell King , Will Deacon Cc: linux-kernel@vger.kernel.org Subject: [PATCH] scripts: recordmcount: fix incorrect use of sprintf Date: Wed, 30 Dec 2015 23:06:41 +0000 Message-Id: <1451516801-16951-1-git-send-email-colin.king@canonical.com> X-Mailer: git-send-email 2.6.4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Colin Ian King 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") Signed-off-by: Colin Ian King --- scripts/recordmcount.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/recordmcount.c b/scripts/recordmcount.c index 301d70b..e1675927 100644 --- a/scripts/recordmcount.c +++ b/scripts/recordmcount.c @@ -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 */ -- 2.6.4