From patchwork Sat Jan 19 01:30:52 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sukadev Bhattiprolu X-Patchwork-Id: 213768 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from ozlabs.org (localhost [IPv6:::1]) by ozlabs.org (Postfix) with ESMTP id 65EEB2C00A4 for ; Sat, 19 Jan 2013 12:31:11 +1100 (EST) Received: by ozlabs.org (Postfix) id 13F422C007E; Sat, 19 Jan 2013 12:30:40 +1100 (EST) Delivered-To: linuxppc-dev@ozlabs.org Received: from e39.co.us.ibm.com (e39.co.us.ibm.com [32.97.110.160]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "e39.co.us.ibm.com", Issuer "GeoTrust SSL CA" (not verified)) by ozlabs.org (Postfix) with ESMTPS id 6C71D2C0082 for ; Sat, 19 Jan 2013 12:30:35 +1100 (EST) Received: from /spool/local by e39.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 18 Jan 2013 18:30:32 -0700 Received: from d03dlp01.boulder.ibm.com (9.17.202.177) by e39.co.us.ibm.com (192.168.1.139) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Fri, 18 Jan 2013 18:30:30 -0700 Received: from d03relay02.boulder.ibm.com (d03relay02.boulder.ibm.com [9.17.195.227]) by d03dlp01.boulder.ibm.com (Postfix) with ESMTP id 6DC3DC40003 for ; Fri, 18 Jan 2013 18:30:18 -0700 (MST) Received: from d03av02.boulder.ibm.com (d03av02.boulder.ibm.com [9.17.195.168]) by d03relay02.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r0J1USRB153218 for ; Fri, 18 Jan 2013 18:30:28 -0700 Received: from d03av02.boulder.ibm.com (loopback [127.0.0.1]) by d03av02.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id r0J1URrZ014647 for ; Fri, 18 Jan 2013 18:30:28 -0700 Received: from suka ([9.47.24.134]) by d03av02.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id r0J1UQPS014507; Fri, 18 Jan 2013 18:30:27 -0700 Received: by suka (Postfix, from userid 155514) id 070218070; Fri, 18 Jan 2013 17:30:52 -0800 (PST) Date: Fri, 18 Jan 2013 17:30:52 -0800 From: Sukadev Bhattiprolu To: acme@ghostprotocols.net, Anton Blanchard , paulus@samba.org Subject: [PATCH] perf: Fix compile warnings in tests/attr.c Message-ID: <20130119013052.GA24693@us.ibm.com> MIME-Version: 1.0 Content-Disposition: inline X-Operating-System: Linux 2.0.32 on an i486 User-Agent: Mutt/1.5.20 (2009-06-14) X-Content-Scanned: Fidelis XPS MAILER x-cbid: 13011901-3620-0000-0000-000000EF8D3B Cc: linuxppc-dev@ozlabs.org, jolsa@redhat.com, linux-kernel@vger.kernel.org X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" From 4d266e5040c33103f5d226b0d16b89f8ef79e3ad Mon Sep 17 00:00:00 2001 From: Sukadev Bhattiprolu Date: Fri, 18 Jan 2013 11:14:28 -0800 Subject: [PATCH] perf: Fix compile warnings in tests/attr.c Replace '%llu' in printf()s with 'PRIu64' in 'tools/perf/tests/attr.c' to fix compile warnings (which become errors due to -Werror). Signed-off-by: Sukadev Bhattiprolu --- tools/perf/tests/attr.c | 20 ++++++++++---------- 1 files changed, 10 insertions(+), 10 deletions(-) diff --git a/tools/perf/tests/attr.c b/tools/perf/tests/attr.c index f61dd3f..5cbb2b3 100644 --- a/tools/perf/tests/attr.c +++ b/tools/perf/tests/attr.c @@ -65,7 +65,7 @@ static int store_event(struct perf_event_attr *attr, pid_t pid, int cpu, FILE *file; char path[PATH_MAX]; - snprintf(path, PATH_MAX, "%s/event-%d-%llu-%d", dir, + snprintf(path, PATH_MAX, "%s/event-%d-%" PRIu64 "-%d", dir, attr->type, attr->config, fd); file = fopen(path, "w+"); @@ -74,7 +74,7 @@ static int store_event(struct perf_event_attr *attr, pid_t pid, int cpu, return -1; } - if (fprintf(file, "[event-%d-%llu-%d]\n", + if (fprintf(file, "[event-%d-%" PRIu64 "-%d]\n", attr->type, attr->config, fd) < 0) { perror("test attr - failed to write event file"); fclose(file); @@ -91,10 +91,10 @@ static int store_event(struct perf_event_attr *attr, pid_t pid, int cpu, /* struct perf_event_attr */ WRITE_ASS(type, PRIu32); WRITE_ASS(size, PRIu32); - WRITE_ASS(config, "llu"); - WRITE_ASS(sample_period, "llu"); - WRITE_ASS(sample_type, "llu"); - WRITE_ASS(read_format, "llu"); + WRITE_ASS(config, PRIu64); + WRITE_ASS(sample_period, PRIu64); + WRITE_ASS(sample_type, PRIu64); + WRITE_ASS(read_format, PRIu64); WRITE_ASS(disabled, "d"); WRITE_ASS(inherit, "d"); WRITE_ASS(pinned, "d"); @@ -119,10 +119,10 @@ static int store_event(struct perf_event_attr *attr, pid_t pid, int cpu, WRITE_ASS(exclude_callchain_user, "d"); WRITE_ASS(wakeup_events, PRIu32); WRITE_ASS(bp_type, PRIu32); - WRITE_ASS(config1, "llu"); - WRITE_ASS(config2, "llu"); - WRITE_ASS(branch_sample_type, "llu"); - WRITE_ASS(sample_regs_user, "llu"); + WRITE_ASS(config1, PRIu64); + WRITE_ASS(config2, PRIu64); + WRITE_ASS(branch_sample_type, PRIu64); + WRITE_ASS(sample_regs_user, PRIu64); WRITE_ASS(sample_stack_user, PRIu32); fclose(file);