* sched_sedf printf formatting warnings
@ 2005-05-09 21:44 Hollis Blanchard
2005-05-10 22:14 ` Stephan Diestelhorst
0 siblings, 1 reply; 3+ messages in thread
From: Hollis Blanchard @ 2005-05-09 21:44 UTC (permalink / raw)
To: xen-devel
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.
--
Hollis Blanchard
IBM Linux Technology Center
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: sched_sedf printf formatting warnings
2005-05-09 21:44 sched_sedf printf formatting warnings Hollis Blanchard
@ 2005-05-10 22:14 ` Stephan Diestelhorst
2005-05-10 22:15 ` Keir Fraser
0 siblings, 1 reply; 3+ messages in thread
From: Stephan Diestelhorst @ 2005-05-10 22:14 UTC (permalink / raw)
To: Hollis Blanchard, xen-devel
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.
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: sched_sedf printf formatting warnings
2005-05-10 22:14 ` Stephan Diestelhorst
@ 2005-05-10 22:15 ` Keir Fraser
0 siblings, 0 replies; 3+ messages in thread
From: Keir Fraser @ 2005-05-10 22:15 UTC (permalink / raw)
To: Stephan Diestelhorst; +Cc: xen-devel
On 10 May 2005, at 23:14, Stephan Diestelhorst wrote:
> 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?
It's fixed already. You use PRIu64 from inttypes.h.
-- Keir
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-05-10 22:15 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-09 21:44 sched_sedf printf formatting warnings Hollis Blanchard
2005-05-10 22:14 ` Stephan Diestelhorst
2005-05-10 22:15 ` Keir Fraser
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.