On a gentoo v1.0 system that is emerge -u --deep world clean as of 2003-01-10 kwavecontrol failes to compile: wcard.cpp: In method `int WCard::getBitRate(BitRates *, int &)': wcard.cpp:204: incompatible types in assignment of `const char[5]' to `char[5]' wcard.cpp:205: incompatible types in assignment of `const char[5]' to `char[5]' wcard.cpp:206: incompatible types in assignment of `const char[5]' to `char[5]' wcard.cpp:207: incompatible types in assignment of `const char[5]' to `char[5]' wcard.cpp:208: incompatible types in assignment of `const char[5]' to `char[5]' wcard.cpp:213: warning: control reaches end of non-void function `WCard::getBitRate(BitRates *, int &)' wcard.cpp: In method `int WCard::getChannel(int &, double &, char *, int &, int &)': wcard.cpp:282: warning: comparison between signed and unsigned wcard.cpp:246: warning: unused variable `int index' wcard.cpp: In method `int WCard::getRTS(int &)': wcard.cpp:367: warning: unused parameter `int & value' wcard.cpp:369: warning: control reaches end of non-void function `WCard::getRTS(int &)' make: *** [wcard.o] Error 1 The following patch seems to fix it, but I wouldn't trust my solution: --- kwavecontrol/wcard.cpp.orig 2002-12-04 15:32:44.000000000 -0500 +++ kwavecontrol/wcard.cpp 2003-01-10 16:06:02.000000000 -0500 @@ -201,11 +201,11 @@ switch (cnt) { - case 0: br->bitRate[i].unit = "bps\0"; break; - case 1: br->bitRate[i].unit = "kbps"; break; - case 2: br->bitRate[i].unit = "Mbps"; break; - case 3: br->bitRate[i].unit = "Gbps"; break; - case 4: br->bitRate[i].unit = "Tbps"; break; + case 0: strncpy(br->bitRate[i].unit, "bps\0", 5); break; + case 1: strncpy(br->bitRate[i].unit, "kbps", 5); break; + case 2: strncpy(br->bitRate[i].unit, "Mbps", 5); break; + case 3: strncpy(br->bitRate[i].unit, "Gbps", 5); break; + case 4: strncpy(br->bitRate[i].unit, "Tbps", 5); break; } }
I cannot reproduce this, but there's a bug report from someone in the kwavecntrol sourceforge repository about this error. Maybe it's gcc2-only. Unfortunately I don't have a wireless card atm, so I can't check that your patch is correct (thoh it looks ok), anyone?
sourceforge does not appear to have a CVS archive of kwavecontrol. The support request mentioned is at: https://sourceforge.net/tracker/index.php?func=detail&aid=662302&group_id=67395&atid=517767 I am indeed running gcc-2.95.3(-r7) kwavecontrol-0.2 appears to work correctly with the patch I supplied
Created attachment 7850 [details] patch attached as file to inform upstream authors.
thanks for your patch, committed to portage. please mark this bug as fixed if it works for you.
hi, i just committed kwavecontrol-0.3, which uses strcpy instead of strncpy, it should also work with gcc-2.95.3. would be nice if you test this :)
kwavecontrol-0.3 builds fine on my system (gcc-2.95.3, kde-3.1): % ACCEPT_KEYWORDS="~x86" emerge kwavecontrol It appears to work properly. I'd say unmask the ebuild and close the bug.
added a patch to kwavecontrol to initialize some variables. should be safe (works here), please test this. thanks.
Sorry for the delay. It took 14 days! to rebuild my 522 package world file after an upgrade from gentoo-1.0 to gentoo-1.4 (its a p2-400 with 196MB ram) So I can no longer test this under gcc-2.95.3, but it does work under gcc-3.2.2.
great, i marked kwavecontrol-0.3 stable. thanks.