Skip to contentSkip to conversation

Fix warning

PATCH Luiz Fernando Capitulino 1 participant 1 message Feb 3, 2004 Kernel janitors

lore
Share & tools
lore
#0 lore raw

Hi Adrian,

Em Seg, 2004-02-02 às 20:03, Adrian Bunk escreveu:

Quoted 10 lines
Quoted 7 lines
Quoted 3 lines

IIRC the policy for adding #ifdefs on .c files is when it's really
necessary, and I don't really see the point for this (expect object size and an extra symbol defined, which I don't think it really hurts here).

AFAIK, the _real_ problem is when you have #ifdef/#endif inside
functions. I agree that is better to avoid it in .c files, but is not all the cases that it can be done.

Let's think about something different:
CONFIG_PROC_FS=n is _very_ unusual.

Ok.

Quoted 2 lines

It's good that drivers compile and work with CONFIG_PROC_FS=n, and it's also good to remove warnings in code.

Yes.

Quoted 2 lines

But is it really worth uglifying code with #ifdef's to avoid a completely harmless warning in a very unusual configuration?

Well, as I said before, I agree that #ifdef's are bad (actually, I
think the real problem is use it inside functions, but I agree it's bad in .c files too).

When I did the first patch, people said is ok to do this things,
when there is not other way, of course. I'm doing it.

But, when Felipe said it were bad, I tryed to think in another way
to make the change. I think the solution is to put things in .h, but even with it, will be necessary a #ifdef/#endif in *.c files.

So, as you can see, a help here will be better than "its bad".

thank you,

Signature · 9 lines
Luiz Fernando N. Capitulino
<[email protected]>
<http://www.telecentros.sp.gov.br>


_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors