Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 13672 - kwavecontrol-0.2 fails to build
Summary: kwavecontrol-0.2 fails to build
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo KDE team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-01-10 15:50 UTC by Aric LeDell
Modified: 2003-02-27 13:56 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
patch (kwavecontrol-0.2-gcc-2.95.3.diff,789 bytes, text/plain)
2003-02-02 13:23 UTC, Hannes Mehnert (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Aric LeDell 2003-01-10 15:50:27 UTC
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;
     }

   }
Comment 1 Dan Armak (RETIRED) gentoo-dev 2003-02-01 13:59:24 UTC
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? 
Comment 2 Aric LeDell 2003-02-01 15:16:08 UTC
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
Comment 3 Hannes Mehnert (RETIRED) gentoo-dev 2003-02-02 13:23:37 UTC
Created attachment 7850 [details]
patch

attached as file to inform upstream authors.
Comment 4 Hannes Mehnert (RETIRED) gentoo-dev 2003-02-02 13:27:20 UTC
thanks for your patch, committed to portage. please mark this bug as fixed if it works for you. 
Comment 5 Hannes Mehnert (RETIRED) gentoo-dev 2003-02-09 08:49:06 UTC
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 :) 
Comment 6 Aric LeDell 2003-02-09 10:17:31 UTC
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.
Comment 7 Hannes Mehnert (RETIRED) gentoo-dev 2003-02-12 09:13:16 UTC
added a patch to kwavecontrol to initialize some variables. should be safe (works 
here), please test this. thanks. 
Comment 8 Aric LeDell 2003-02-27 13:29:24 UTC
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.
Comment 9 Hannes Mehnert (RETIRED) gentoo-dev 2003-02-27 13:56:40 UTC
great, i marked kwavecontrol-0.3 stable. 
thanks.