Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3632027imu; Mon, 28 Jan 2019 08:09:01 -0800 (PST) X-Google-Smtp-Source: ALg8bN7Loso/wMhLqrgXWNMXqdiS5nfimxvQnqh+W3DdW9Rg4VoUkh8ybDt1nnqrBp/jYoXXF6XP X-Received: by 2002:a17:902:bb05:: with SMTP id l5mr22756904pls.230.1548691741634; Mon, 28 Jan 2019 08:09:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548691741; cv=none; d=google.com; s=arc-20160816; b=uKoEb9+FAkY3H76JGg8awZcMal4dywXt8GKC247kyKWW30N1J/D+rX76OjYUuM5vK1 eVnIGVGf7hzFb0v4OQ7CCm1Y/OCcoQFRVwOIheY2If6JShFGrndnMgyVL5DMZ2HuZYxm RpjUoHger1IMfb4mfScIRNpdQ2XHwDewOPbQjg61ursd8nvxDyxcpz49yQ60nmAHDHzL isyr/KobYha5pT07jhv9am++5MlMn44ua4uMYySX6I9kgWlstgGavyqgy416NLX56vy0 lSz4K2tb04QPrTQfDIsXjSrnpL2YFRcSG38tJtFqvNKriprw+t7w0pek+EvZbatHgDA1 0tBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=OVbt8eFvOFBsadWbhAENWEMWMqJoZmO4rEZLMU3Kjfs=; b=z8QhTLSs/1uYJe2AD6uB6is54T9XAFM6PoxEjfMYmaRdBc4LO9Y4JbJmL86k/LvckK bhyelkf7un7eGmUkUUhXrrb3OoC26CyCyQ9gWAN7m743qzxeIdx6RPaky/mR0Ad03bwO RdafK5E5NIuUbY+RHtHhOnMK6xq8tzv7DvOEHs8d6yC071z00wlrhRIFG3oxsgOXVgyu dALbkMEcGPnGhgXkaA0v1XD3vKWvBCIHSIg/xKe9dJHtTjr1lDmuKar6acqtMQqt2tfU AB7r8k36C/F6jv0lloNL4PE7sxYasvInawKXwZdk0HQw6BNjqmfcRinwBAK7rG0MBLUA +xCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=pI6FRwGf; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 2si16079666pgj.104.2019.01.28.08.08.46; Mon, 28 Jan 2019 08:09:01 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=pI6FRwGf; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732268AbfA1QHp (ORCPT + 99 others); Mon, 28 Jan 2019 11:07:45 -0500 Received: from mail.kernel.org ([198.145.29.99]:58784 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730554AbfA1QHo (ORCPT ); Mon, 28 Jan 2019 11:07:44 -0500 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id EA76520989; Mon, 28 Jan 2019 16:07:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1548691663; bh=hwCBoP3TF53Hf3L/UK+DH2PVmqFhzQfX/W+E5YP2rqQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pI6FRwGfs3PVviHZxgggzSNy7K/jrjAqa6wlX3TqPn/1w1rQtz33NPModIT/Kks3W d5UK7MgrQ/xwV9V8XIdV8vuxGj4L0SuSIRfSfAupE74XL94qEcQs5U4IK2HmH8d86q nGnF7nc4uGD+mCSM8ldXaOJyRonIkp8dbEDZFl0g= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Arnaldo Carvalho de Melo , Adrian Hunter , Jiri Olsa , Namhyung Kim , Sasha Levin Subject: [PATCH AUTOSEL 4.19 178/258] perf header: Fix up argument to ctime() Date: Mon, 28 Jan 2019 10:58:04 -0500 Message-Id: <20190128155924.51521-178-sashal@kernel.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190128155924.51521-1-sashal@kernel.org> References: <20190128155924.51521-1-sashal@kernel.org> MIME-Version: 1.0 X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Arnaldo Carvalho de Melo [ Upstream commit 0afcf29bab35d3785204cd9bd51693b231ad7181 ] Reducing this noise when cross building to the Android NDK: util/header.c: In function 'perf_header__fprintf_info': util/header.c:2710:45: warning: pointer targets in passing argument 1 of 'ctime' differ in signedness [-Wpointer-sign] fprintf(fp, "# captured on : %s", ctime(&st.st_ctime)); ^ In file included from util/../perf.h:5:0, from util/evlist.h:11, from util/header.c:22: /opt/android-ndk-r15c/platforms/android-26/arch-arm/usr/include/time.h:81:14: note: expected 'const time_t *' but argument is of type 'long unsigned int *' extern char* ctime(const time_t*) __LIBC_ABI_PUBLIC__; ^ Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-6bz74zp080yhmtiwb36enso9@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin --- tools/perf/util/header.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c index ac3c59e7da16..bd9226bc5945 100644 --- a/tools/perf/util/header.c +++ b/tools/perf/util/header.c @@ -2636,6 +2636,7 @@ int perf_header__fprintf_info(struct perf_session *session, FILE *fp, bool full) struct perf_header *header = &session->header; int fd = perf_data__fd(session->data); struct stat st; + time_t stctime; int ret, bit; hd.fp = fp; @@ -2645,7 +2646,8 @@ int perf_header__fprintf_info(struct perf_session *session, FILE *fp, bool full) if (ret == -1) return -1; - fprintf(fp, "# captured on : %s", ctime(&st.st_ctime)); + stctime = st.st_ctime; + fprintf(fp, "# captured on : %s", ctime(&stctime)); fprintf(fp, "# header version : %u\n", header->version); fprintf(fp, "# data offset : %" PRIu64 "\n", header->data_offset); -- 2.19.1