Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753338AbbFDSGK (ORCPT ); Thu, 4 Jun 2015 14:06:10 -0400 Received: from mail-wg0-f47.google.com ([74.125.82.47]:33082 "EHLO mail-wg0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752609AbbFDSGH (ORCPT ); Thu, 4 Jun 2015 14:06:07 -0400 User-Agent: K-9 Mail for Android In-Reply-To: <20150604173612.GB1530@localhost.localdomain> References: <1433360319-17514-1-git-send-email-fransklaver@gmail.com> <20150604173612.GB1530@localhost.localdomain> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Subject: Re: [PATCH] Doc: networking: txtimestamp: fix printf format warning From: Frans Klaver Date: Thu, 04 Jun 2015 20:05:58 +0200 To: Richard Cochran CC: Jonathan Corbet , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Message-ID: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 927 Lines: 26 On 4 June 2015 19:36:12 CEST, Richard Cochran wrote: >On Wed, Jun 03, 2015 at 09:38:39PM +0200, Frans Klaver wrote: >> Documentation/networking/timestamping/txtimestamp.c: In function >‘__print_timestamp’: >> Documentation/networking/timestamping/txtimestamp.c:99:3: warning: >format ‘%ld’ expects argument of type ‘long int’, but argument 3 has >type ‘int64_t’ [-Wformat=] >> fprintf(stderr, " (%+ld us)", cur_ms - prev_ms); >> >> int64_t differs per platform, so a cast is required. > >No cast is needed. Use PRId64 in the format string instead. Wow, I can't believe I've never run into those... Will resend. Thanks, Frans -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/