Alexander Beregalov
2008-Aug-05 20:12 UTC
[Ocfs2-devel] [PATCH] ocfs2/cluster/netdebug.c: fix warning
From: Alexander Beregalov <a.beregalov at gmail.com> ocfs2/cluster/netdebug.c: fix warning fs/ocfs2/cluster/netdebug.c:154: warning: format '%lu' expects type 'long unsigned int', but argument 17 has type 'suseconds_t' Signed-off-by: Alexander Beregalov <a.beregalov at gmail.com> --- fs/ocfs2/cluster/netdebug.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/fs/ocfs2/cluster/netdebug.c b/fs/ocfs2/cluster/netdebug.c index d8bfa0e..cdc0ed2 100644 --- a/fs/ocfs2/cluster/netdebug.c +++ b/fs/ocfs2/cluster/netdebug.c @@ -151,7 +151,7 @@ static int nst_seq_show(struct seq_file *seq, void *v) nst->st_send_time.tv_sec, (unsigned long)nst->st_send_time.tv_usec, nst->st_status_time.tv_sec, - nst->st_status_time.tv_usec); + (unsigned long)nst->st_status_time.tv_usec); } spin_unlock(&o2net_debug_lock);
Joel Becker
2008-Aug-05 20:29 UTC
[Ocfs2-devel] [PATCH] ocfs2/cluster/netdebug.c: fix warning
On Wed, Aug 06, 2008 at 12:10:36AM +0400, Alexander Beregalov wrote:> From: Alexander Beregalov <a.beregalov at gmail.com> > > ocfs2/cluster/netdebug.c: fix warning > > fs/ocfs2/cluster/netdebug.c:154: warning: format '%lu' expects > type 'long unsigned int', but argument 17 has type 'suseconds_t' > > Signed-off-by: Alexander Beregalov <a.beregalov at gmail.com> > --- > > fs/ocfs2/cluster/netdebug.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/fs/ocfs2/cluster/netdebug.c b/fs/ocfs2/cluster/netdebug.c > index d8bfa0e..cdc0ed2 100644 > --- a/fs/ocfs2/cluster/netdebug.c > +++ b/fs/ocfs2/cluster/netdebug.c > @@ -151,7 +151,7 @@ static int nst_seq_show(struct seq_file *seq, void *v) > nst->st_send_time.tv_sec, > (unsigned long)nst->st_send_time.tv_usec, > nst->st_status_time.tv_sec, > - nst->st_status_time.tv_usec); > + (unsigned long)nst->st_status_time.tv_usec);suseconds_t is a signed long. Can you change the format to %ld and cast to long? Unfortunately, we need the cast, as sparc64 and parisc treat it as int. Joel -- "If you are ever in doubt as to whether or not to kiss a pretty girl, give her the benefit of the doubt" -Thomas Carlyle Joel Becker Principal Software Developer Oracle E-mail: joel.becker at oracle.com Phone: (650) 506-8127