Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp2654905imj; Mon, 11 Feb 2019 06:32:35 -0800 (PST) X-Google-Smtp-Source: AHgI3IaTr+vjm9FhpktiP2NchutkGICD3M0R+40jMiOW4EF+mrUugBONwUeLGCa4xo2NiUtE1ORe X-Received: by 2002:a62:4587:: with SMTP id n7mr36733288pfi.118.1549895555898; Mon, 11 Feb 2019 06:32:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549895555; cv=none; d=google.com; s=arc-20160816; b=H88D+8jXslV6wdvKwFpxm10UU55TXI5mt/YLL8DtkytbW0d02rwf27yQoy21aFty7d QXo5ugljikjrk1DrE50T5e09k7YoMtwljfgveLQjMiBxResx96SOV9bm6LpaQL0jAgto AEUfyzISUeHjs24SFltVawj+Hytucdv8U13ZIGmyOgMzcipaIc+VRRQHPSG8eioCxU0N sNdohlWR/Wchfz0Yg44n/Paod6gk2VoOLJqNwsyHSQ/CoS78tYpDY9sVNqsLdB7H0pCR Jgq8rFPo8TItxKq4pDj2HrUz7bEFqs1n9/b6Il4xPNTPDGTIM44Rzy/u98UVLf4fWlBe 9iMw== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=1IzQsvp2tU2Idgpc9i7CW8d/zuq5BSTgoozONJTJO6Q=; b=fVMAAcHGgAT7X8toADYOhzqPdXifIgFRy0w5uoj60YfjYYFCqlly+JAFHWUj0d8pqo mdGc3UnWkBAyJmHAKJVllGN9DvDyDTo4ngFlmkH9ckuaoPHHUMcQkkNrcZ+83WY9WIIj R8ipGqvPuCtFnET1/QmXdEZ6Wd5VMOpIGgwTPes5rbARVCW6uVg2V4eQwS5AYz/M5Zmz MTvRd6srj63fFyIIe2eukXPaniifXKuaM44KwbK/+IpLGyAsdpA3NMvoB3YhHSLaCXVh F9VFZFhJbH4ZzaVbNx+IAMbg8FwTycl5g7uKVmcwpcnsi8jd8xx5OAhwQaKuHshKcGeJ 9+Pw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=SIg88AF8; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b5si2225639pgl.254.2019.02.11.06.32.18; Mon, 11 Feb 2019 06:32:35 -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=SIg88AF8; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730124AbfBKOaa (ORCPT + 99 others); Mon, 11 Feb 2019 09:30:30 -0500 Received: from mail.kernel.org ([198.145.29.99]:36872 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728329AbfBKOa1 (ORCPT ); Mon, 11 Feb 2019 09:30:27 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A298C20675; Mon, 11 Feb 2019 14:30:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1549895427; bh=cDni1AGBhfkYN3mGBKBsCcOIDMbURhi9dDEQ/b86BNU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SIg88AF8JtMi96iAZVio3C7OsPAROvioSzX7Qh47TTz7vUtYgupYyD3tDgbje6Eaa AqvuPLOwiXyPS6vGrrRWNHXbW3uV59lRGf04IUfbkQfzOeWkFkVzVpaPe6tcQJHuRJ QyapxzPS4+hY1lCiqAHqQAlkppO0xPZq/Wlg/2gI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Adrian Hunter , Jiri Olsa , Namhyung Kim , Arnaldo Carvalho de Melo , Sasha Levin Subject: [PATCH 4.20 201/352] perf header: Fix up argument to ctime() Date: Mon, 11 Feb 2019 15:17:08 +0100 Message-Id: <20190211141859.933424574@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190211141846.543045703@linuxfoundation.org> References: <20190211141846.543045703@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.20-stable review patch. If anyone has any objections, please let me know. ------------------ [ 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 13a2251a37c5..05f40bb51a88 100644 --- a/tools/perf/util/header.c +++ b/tools/perf/util/header.c @@ -2659,6 +2659,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; @@ -2668,7 +2669,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