mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Re: "duplicate const" compile warning in 2.5.42
@ 2002-10-12  8:38 Steven French
  2002-10-12 11:52 ` Anton Blanchard
  0 siblings, 1 reply; 2+ messages in thread
From: Steven French @ 2002-10-12  8:38 UTC (permalink / raw)
  To: Reuben Farrelly; +Cc: linux-kernel, anton


Reuben,
The "duplicate const" compile warning you mention seems to be a minor
problem with the min/max macros.

The fix for the 64 bit warnings for the cifs vfs are not going to affect
the duplicate const minor warning caused by the min/max macro.  This
warning does not show up on my i386 2.5.41 builds.



Steve French
Senior Software Engineer
Linux Technology Center - IBM Austin
phone: 512-838-2294
email: sfrench@us.ibm.com



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

* Re: "duplicate const" compile warning in 2.5.42
  2002-10-12  8:38 "duplicate const" compile warning in 2.5.42 Steven French
@ 2002-10-12 11:52 ` Anton Blanchard
  0 siblings, 0 replies; 2+ messages in thread
From: Anton Blanchard @ 2002-10-12 11:52 UTC (permalink / raw)
  To: Steven French; +Cc: Reuben Farrelly, linux-kernel


> Reuben,
> The "duplicate const" compile warning you mention seems to be a minor
> problem with the min/max macros.
> 
> The fix for the 64 bit warnings for the cifs vfs are not going to affect
> the duplicate const minor warning caused by the min/max macro.  This
> warning does not show up on my i386 2.5.41 builds.

Im using gcc 3.2 for ppc64 compiles, I guess earlier compilers dont
emit this warning.

Its not Steve's fault, for example mm/vmscan.c:shrink_caches gets
a warning because of

const int nr_pages:
...
to_reclaim = max(to_reclaim, nr_pages);

ie:

to_reclaim = ({
	const typeof(to_reclaim) _x = (to_reclaim);
	const typeof(nr_pages) _y = (nr_pages);
	(void) (&_x == &_y);
	_x > _y ? _x : _y;
});

Which ends up as const const int _y = (nr_pages);

Anton

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

end of thread, other threads:[~2002-10-12 11:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-12  8:38 "duplicate const" compile warning in 2.5.42 Steven French
2002-10-12 11:52 ` Anton Blanchard

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

all inboxes | Powered by JetHome®