All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephan Diestelhorst <sd386@cl.cam.ac.uk>
To: Hollis Blanchard <hollisb@us.ibm.com>,
	xen-devel <xen-devel@lists.xensource.com>
Subject: Re: sched_sedf printf formatting warnings
Date: Tue, 10 May 2005 23:14:53 +0100	[thread overview]
Message-ID: <4281325D.2060804@cl.cam.ac.uk> (raw)
In-Reply-To: <427FD9A2.4070106@us.ibm.com>

Odd, are you compiling on x86-64 hardware? If so then s_time_t will be
just a normal long.
So how to print a 64-bit integer? Because always casting to (long long)
would be quite tedious. And different printfs for each architecture are
not nice too.

The printfs in schedule.c simply workaround that by decomposing the
value into two 32-bit values ant prinitng it out hex. But I find time in
decimal notation much more convenient...

Any ideas?

Stephan
> With the new sched_sedf.c, I get a whole host of these:
> 
> sched_sedf.c: In function `extraq_add_sort_update':
> sched_sedf.c:183: warning: long long int format, s_time_t arg (arg 5)
> sched_sedf.c: In function `__del_from_queue':
> sched_sedf.c:269: warning: long long unsigned int format, s_time_t arg
> (arg 4)
> [...]
> 
> And since we have -Wall -Werror, the build fails.
> 
> Not sure what the right fix is here. I think Linux defined its own %z
> for size_t printf arguments... Of course, there is always casting.
> 

  reply	other threads:[~2005-05-10 22:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-09 21:44 sched_sedf printf formatting warnings Hollis Blanchard
2005-05-10 22:14 ` Stephan Diestelhorst [this message]
2005-05-10 22:15   ` Keir Fraser

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=4281325D.2060804@cl.cam.ac.uk \
    --to=sd386@cl.cam.ac.uk \
    --cc=hollisb@us.ibm.com \
    --cc=xen-devel@lists.xensource.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.