lkml.org 
[lkml]   [1999]   [Jan]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Working towards 2.2.0: Cosmetics..
Mike wrote:
> > adb.c:15: asm/prom.h: No such file or directory
> > adb.c:16: asm/adb.h: No such file or directory
> > adb.c:17: asm/cuda.h: No such file or directory
> > adb.c:18: asm/pmu.h: No such file or directory
> > adb.c:20: asm/hydra.h: No such file or directory
>
> These includes exist if you are on a power-pc which is the only time you
> might want to be compiling adb.c anyway as far as I can see.
> They do appear when you do a make dep though, and I don't know how you'd
> go about getting rid of them.

If they were _really_ ppc-specific you could just explicitly include
"asm-ppc/prom.h" (etc) and fix the warnings. Unforunately, asm/adb.h
also exists for m68k, although I don't think the adb.c in the tree is
prepared for the m68k-based macs right now. Maybe we just need to put
those includes inside '#ifdef CONFIG_PPC' or something. It would be
redundant from the compilers point of view (since it will never look
at the file) but it should make 'make depend' happier.

> > 8390.c: In function `ei_close':
> > 8390.c:177: warning: unused variable `ei_local'
> > 8390.c: In function `set_multicast_list':
> > 8390.c:978: warning: unused variable `ei_local'
>
> These are because spin_lock_irqsave and spin_lock_irqrestore often
> ignore their first arguemnt. I say often, because it depends on
> architecture, whether the kernel is SMP or not, and how much debuging code
> is enabled. I can't see any easy way to remover these warnings (and they
> are completely harmless...).

Probably the best way to quiet those up would be to just cast the
unused variable in the macro to void. For example:
/* 'a' is not actually used in the following macro */
#define foo(a,b) \
do { \
(void) (a); \
b++; \
} while(0)
This will shut gcc up.

-Mitch

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:49    [from the cache]
©2003-2011 Jasper Spaans