Linux PARISC architecture development
 help / color / mirror / Atom feed
* [parisc-linux] warning: long unsigned int format, time_t arg
@ 2003-09-21 17:59 Joel Soete
  2003-09-21 18:46 ` John David Anglin
  0 siblings, 1 reply; 6+ messages in thread
From: Joel Soete @ 2003-09-21 17:59 UTC (permalink / raw)
  To: parisc-linux

Hi all,

during compiling 2.6.0-test5-pa6 with gcc-3.3, i noticed some warning of 
type:
[snip]
  CC      fs/exec.o
fs/exec.c: In function `format_corename':
fs/exec.c:1219: warning: long unsigned int format, time_t arg (arg 4)
[snip]

for which I would suggest the following patch:
hpalin:/Debian-apt/SRC/linux-2.6.0-test5-pa6/fs# diff -Nau exec.c.Orig 
exec.c.new
--- exec.c.Orig    2003-09-10 18:18:40.000000000 +0200
+++ exec.c.new    2003-09-16 23:55:12.000000000 +0200
@@ -1216,7 +1216,7 @@
                 struct timeval tv;
                 do_gettimeofday(&tv);
                 rc = snprintf(out_ptr, out_end - out_ptr,
-                          "%lu", tv.tv_sec);
+                          "%lu", (unsigned long int)tv.tv_sec);
                 if (rc > out_end - out_ptr)
                     goto out;
                 out_ptr += rc;

I would like your opinion before submiting (hmm to Andrew I presume?)

Thanks in advance,
    Joel

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2003-09-22  6:48 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-09-21 17:59 [parisc-linux] warning: long unsigned int format, time_t arg Joel Soete
2003-09-21 18:46 ` John David Anglin
2003-09-21 19:04   ` Matthew Wilcox
2003-09-21 19:16     ` John David Anglin
2003-09-21 19:32       ` Matthew Wilcox
2003-09-22  6:48         ` Jan-Benedict Glaw

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox