mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Richard Cochran <richardcochran@gmail.com>
To: Frans Klaver <fransklaver@gmail.com>
Cc: Jonathan Corbet <corbet@lwn.net>,
	linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Doc: networking: txtimestamp: fix printf format warning
Date: Thu, 4 Jun 2015 19:36:12 +0200	[thread overview]
Message-ID: <20150604173612.GB1530@localhost.localdomain> (raw)
In-Reply-To: <1433360319-17514-1-git-send-email-fransklaver@gmail.com>

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.

Thanks,
Richard

  reply	other threads:[~2015-06-04 17:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-03 19:38 Frans Klaver
2015-06-04 17:36 ` Richard Cochran [this message]
2015-06-04 18:05   ` Frans Klaver

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150604173612.GB1530@localhost.localdomain \
    --to=richardcochran@gmail.com \
    --cc=corbet@lwn.net \
    --cc=fransklaver@gmail.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®