compilation error
- From: "Amadeus W.M." <amadeus84@xxxxxxxxxxx>
- Date: Sun, 29 Jun 2008 01:50:28 GMT
I need an expert's help in compiling a kernel module. Specifically, I'm
trying to compile x10dev-2 (http://wish.sourceforge.net/).
As an aside, there exists a way to control the lights and appliances in
your house from your computer. To do so, you need an X10 device that you
plug in a power outlet at one end and at the other end you connect it to
your computer via the usb or the serial port. Naturally, there has to be a
driver to talk to the device, and this is what x10dev is.
Long story short, when trying to compile it, I get these errors:
/usr/local/src/x10dev-2.1.7/dev/dev.c:621: error: void value not ignored
as it ought to be
/usr/local/src/x10dev-2.1.7/dev/dev.c:626: error: void value not ignored
as it ought to be
make[3]: *** [/usr/local/src/x10dev-2.1.7/dev/dev.o] Error 1
make[2]: *** [_module_/usr/local/src/x10dev-2.1.7/dev] Error 2
This is the function where both errors occur:
614 void __exit
615 x10_exit (void)
616 {
617 dbg ("%s", "Unloading X10 driver");
618
619 if (x10api.data >= 0) {
620 dbg ("unregistering %d:%s", x10api.data, DATA_DEVICE_NAME);
621 if (unregister_chrdev (x10api.data, DATA_DEVICE_NAME) == -EINVAL)
622 dbg ("error unregistering %s", DATA_DEVICE_NAME);
623 }
624 if (x10api.control >= 0) {
625 dbg ("unregistering %d:%s", x10api.control, CONTROL_DEVICE_NAME);
626 if (unregister_chrdev (x10api.control, CONTROL_DEVICE_NAME) == -
EINVAL)
627 dbg ("error unregistering %s", CONTROL_DEVICE_NAME);
628 }
629 remove_proc_entry(procinfoname,procdir);
630 remove_proc_entry(procdirname,NULL);
631 info ("X10 driver unloaded");
632 }
I don't understand why the compiler complains about not ignoring the
return value on line 621 and 626 when those are if clauses. The function
does not return there. I wonder if it's a compiler bug. I tried compiling
it on F9 with gcc 4.3.0 and on F7 with gcc 4.1.2.
The project seems to be unmaintained and I emailed the author, but no
reply so far. I did manage to install and use this driver before, probably
in FC6 or so.
Does anybody understand what's going on here?
Thanks!
.
- Follow-Ups:
- Re: compilation error
- From: Kees Theunissen
- Re: compilation error
- Prev by Date: 802.11n cards for Linux?
- Next by Date: Re: concatenate files under a specified order
- Previous by thread: 802.11n cards for Linux?
- Next by thread: Re: compilation error
- Index(es):