2004-03-13 13:29:05

by Nick Warne

[permalink] [raw]
Subject: Build problem smbfs/file.c

Just patched 2.6.3 -> 2.6.4

I got a build warning:

... type character `z'...
fs/smbfs/file.c: 272 too many arguments for format.

Line 272:

PARANOIA("%s/%s validation failed, error=%zd\n"

Ummm. I removed the `z' from error=%zd\n" - it appears to be rogue,
but what do I know ;)

And no warnings now. Is this as it should be?

Nick
(not subscribed).
--
"When you're chewing on life's gristle,
Don't grumble, Give a whistle..."


2004-03-13 14:05:36

by Nick Warne

[permalink] [raw]
Subject: Re: Build problem smbfs/file.c

> I got a build warning:
>
> ... type character `z'...
> fs/smbfs/file.c: 272 too many arguments for format.
>
> Line 272:
>
> PARANOIA("%s/%s validation failed, error=%zd\n"
>
> Ummm. I removed the `z' from error=%zd\n" - it appears to be rogue,
> but what do I know ;)
>
> And no warnings now. Is this as it should be?

OK, replying to myself.

it should be (I believe from looking at other code):

PARANOIA("%s/%s validation failed, error=%Zd\n"

Nick

--
"When you're chewing on life's gristle,
Don't grumble, Give a whistle..."

2004-03-13 14:10:54

by Urban Widmark

[permalink] [raw]
Subject: Re: Build problem smbfs/file.c

On Sat, 13 Mar 2004, Nick Warne wrote:

> PARANOIA("%s/%s validation failed, error=%zd\n"
>
> Ummm. I removed the `z' from error=%zd\n" - it appears to be rogue,
> but what do I know ;)

I think someone meant to change my %d into a %Zd, like in smb_file_read.
Or not, since my gcc's understand them both.

Compiler version?

/Urban

2004-03-14 14:15:26

by Nick Warne

[permalink] [raw]
Subject: Re: Build problem smbfs/file.c

> > PARANOIA("%s/%s validation failed, error=%zd\n"
> >
> > Ummm. I removed the `z' from error=%zd\n" - it appears to be rogue,
> > but what do I know ;)
>
> I think someone meant to change my %d into a %Zd, like in smb_file_read.
> Or not, since my gcc's understand them both.
>
> Compiler version?

I installed the recommended kernel GCC as per the docs:

[root@Linux233 linux-2.6.1]# gcc -v
Reading specs from /usr/local/lib/gcc-lib/i586-pc-linux-
gnu/2.95.3/specs
gcc version 2.95.3 20010315 (release)

OK, after some research it is a GCC problem - but I need to ask why
this is now become a problem.

Googling, Andrew Morton pulled this up in the lkml found here:

http://lkml.org/lkml/2003/7/7/225

Now, I am a bit worried if the lower case version `z' is to be used,
that it will be a bit of a problem if there are lots of files using
it.

Also, although GCC reports this as a warning, it also seems to say "I
don't know what this is, so am ignoring it" sort of thing?

Or am I PARANOIA...

Thanks,

Nick

--
"When you're chewing on life's gristle,
Don't grumble, Give a whistle..."