From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephan Diestelhorst Subject: Re: sched_sedf printf formatting warnings Date: Tue, 10 May 2005 23:14:53 +0100 Message-ID: <4281325D.2060804@cl.cam.ac.uk> References: <427FD9A2.4070106@us.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <427FD9A2.4070106@us.ibm.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Hollis Blanchard , xen-devel List-Id: xen-devel@lists.xenproject.org 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. >