mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Re: linux 2.5.25 (different compilation errors)
@ 2002-07-05  8:38 Ivan Gyurdiev
  0 siblings, 0 replies; 2+ messages in thread
From: Ivan Gyurdiev @ 2002-07-05  8:38 UTC (permalink / raw)
  To: LKML, fabbione

Hmm. Haven't received this message. Reading it on LKML.
Please cc, I'm not subscribed.


> iforce-packets.c:252: `IFORCE_USB' undeclared (first use in this function)
> iforce-packets.c:252: (Each undeclared identifier is reported only once
> iforce-packets.c:252: for each function it appears in.)
> iforce-packets.c:282: `IFORCE_232' undeclared (first use in this function)
> iforce-packets.c:278: warning: unreachable code at beginning of switch
> statement

Well, obviously the construct


switch (iforce->bus)

case CONSTANT:

#ifdef CONSTANT
do stuff
#endif

will not work.

Why is all this #ifdef mess necessary.
Those are recognition constants.
How can you compare iforce->bus to IFORCE_USB or IFORCE_232
if those are only defined sometimes, based on config options...

Why not just...
#if defined(CONFIG_JOYSTICK_IFORCE_232)
#define IFORCE_232      1
#endif
#if defined(CONFIG_JOYSTICK_IFORCE_USB)
#define IFORCE_USB      2
#endif

drop the if statements and always define the constants.
The code will get much simpler IMHO.

===========================================

> zr36120.c:1497: unknown field `open' specified in initializer 
zr36120.c:1497: warning: initialization makes integer from pointer without a 
cast zr36120.c:1498: unknown field `close' specified in initializer 
zr36120.c:1498: warning: initialization from incompatible pointer type
>
> [SNIP]
>
> zr36120.c:1839: unknown field `minor' specified in initializer make[3]: *** 
[zr36120.o] Error 1

Here's what I found in the 2.4 videodev.h:
   /* old, obsolete interface -- dropped in 2.5.x, don't use it */
        int (*open)(struct video_device *, int mode);
        void (*close)(struct video_device *);
...
 /* new interface -- we will use file_operations directly
         * like soundcore does.
         * kernel_ioctl() will be called by video_generic_ioctl.
         * video_generic_ioctl() does the userspace copying of the
         * ioctl arguments */

============================================


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

* Re: linux 2.5.25 (different compilation errors)
  2002-07-05  4:47 linux 2.5.25 Ivan Gyurdiev
@ 2002-07-06  5:45 ` Fabio Massimo Di Nitto
  0 siblings, 0 replies; 2+ messages in thread
From: Fabio Massimo Di Nitto @ 2002-07-06  5:45 UTC (permalink / raw)
  To: LKML

Hi all,
            some small other problems.

make dep claims that i2c-old.h is missing. (also in 2.5.24, not tested 
in other versions)

----

  gcc -Wp,-MD,./.iforce-packets.o.d -D__KERNEL__ 
-I/usr/src/linux-2.5.25/include -Wall -Wstrict-prototypes -Wno-trigraphs 
-O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common -pipe 
-mpreferred-stack-boundary=2 -march=i686 -nostdinc -iwithprefix include 
-DMODULE -include /usr/src/linux-2.5.25/include/linux/modversions.h   
-DKBUILD_BASENAME=iforce_packets   -c -o iforce-packets.o iforce-packets.c
iforce-packets.c: In function `iforce_get_id_packet':
iforce-packets.c:252: `IFORCE_USB' undeclared (first use in this function)
iforce-packets.c:252: (Each undeclared identifier is reported only once
iforce-packets.c:252: for each function it appears in.)
iforce-packets.c:282: `IFORCE_232' undeclared (first use in this function)
iforce-packets.c:278: warning: unreachable code at beginning of switch 
statement
iforce-packets.c:248: warning: unused variable `timeout'
iforce-packets.c:247: warning: unused variable `wait'
make[4]: *** [iforce-packets.o] Error 1
make[4]: Leaving directory 
`/usr/src/linux-2.5.25/drivers/input/joystick/iforce'

----

  gcc -Wp,-MD,./.zr36120.o.d -D__KERNEL__ 
-I/usr/src/linux-2.5.25/include -Wall -Wstrict-prototypes -Wno-trigraphs 
-O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common -pipe 
-mpreferred-stack-boundary=2 -march=i686 -nostdinc -iwithprefix include 
-DMODULE -include /usr/src/linux-2.5.25/include/linux/modversions.h   
-DKBUILD_BASENAME=zr36120   -c -o zr36120.o zr36120.c
zr36120.c:1497: unknown field `open' specified in initializer
zr36120.c:1497: warning: initialization makes integer from pointer 
without a cast
zr36120.c:1498: unknown field `close' specified in initializer
zr36120.c:1498: warning: initialization from incompatible pointer type

[SNIP]

zr36120.c:1839: unknown field `minor' specified in initializer
make[3]: *** [zr36120.o] Error 1
make[3]: Leaving directory `/usr/src/linux-2.5.25/drivers/media/video'
make[2]: *** [video] Error 2
make[2]: Leaving directory `/usr/src/linux-2.5.25/drivers/media'
make[1]: *** [media] Error 2
make[1]: Leaving directory `/usr/src/linux-2.5.25/drivers'
make: *** [drivers] Error 2

----

  gcc -Wp,-MD,./.zr36067.o.d -D__KERNEL__ 
-I/usr/src/linux-2.5.25/include -Wall -Wstrict-prototypes -Wno-trigraphs 
-O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common -pipe 
-mpreferred-stack-boundary=2 -march=i686 -nostdinc -iwithprefix include 
-DMODULE -include /usr/src/linux-2.5.25/include/linux/modversions.h   
-DKBUILD_BASENAME=zr36067   -c -o zr36067.o zr36067.c
zr36067.c: In function `zoran_open':
zr36067.c:3267: structure has no member named `busy'
zr36067.c: At top level:
zr36067.c:4404: warning: initialization makes integer from pointer 
without a cast
zr36067.c:4405: warning: initialization makes integer from pointer 
without a cast
zr36067.c:4406: warning: initialization from incompatible pointer type
zr36067.c:4408: warning: initialization makes integer from pointer 
without a cast
zr36067.c:4409: warning: missing braces around initializer
zr36067.c:4409: warning: (near initialization for `zoran_template.lock')
zr36067.c:4409: warning: initialization makes integer from pointer 
without a cast
zr36067.c:4410: warning: initialization makes integer from pointer 
without a cast
zr36067.c:4411: warning: initialization makes integer from pointer 
without a cast
make[3]: *** [zr36067.o] Error 1
make[3]: Leaving directory `/usr/src/linux-2.5.25/drivers/media/video'
make[2]: *** [video] Error 2
make[2]: Leaving directory `/usr/src/linux-2.5.25/drivers/media'
make[1]: *** [media] Error 2
make[1]: Leaving directory `/usr/src/linux-2.5.25/drivers'
make: *** [drivers] Error 2

----

  gcc -Wp,-MD,./.stradis.o.d -D__KERNEL__ 
-I/usr/src/linux-2.5.25/include -Wall -Wstrict-prototypes -Wno-trigraphs 
-O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common -pipe 
-mpreferred-stack-boundary=2 -march=i686 -nostdinc -iwithprefix include 
-DMODULE -include /usr/src/linux-2.5.25/include/linux/modversions.h   
-DKBUILD_BASENAME=stradis   -c -o stradis.o stradis.c
stradis.c: In function `saa_open':
stradis.c:1949: structure has no member named `busy'
stradis.c: In function `saa_close':
stradis.c:1961: structure has no member named `busy'
stradis.c: At top level:
stradis.c:1974: unknown field `open' specified in initializer
stradis.c:1974: warning: initialization makes integer from pointer 
without a cast

[SNIP]

make[3]: *** [stradis.o] Error 1
make[3]: Leaving directory `/usr/src/linux-2.5.25/drivers/media/video'
make[2]: *** [video] Error 2


Regards
Fabio



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

end of thread, other threads:[~2002-07-06  8:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-07-05  8:38 linux 2.5.25 (different compilation errors) Ivan Gyurdiev
  -- strict thread matches above, loose matches on Subject: below --
2002-07-05  4:47 linux 2.5.25 Ivan Gyurdiev
2002-07-06  5:45 ` linux 2.5.25 (different compilation errors) Fabio Massimo Di Nitto

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®