Bug 96277 - compilation error in kledtest.cpp
Summary: compilation error in kledtest.cpp
Status: RESOLVED FIXED
Alias: None
Product: kdelibs
Classification: Unmaintained
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Stephan Kulow
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-01-04 09:23 UTC by aaron667
Modified: 2005-07-14 01:54 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Patch for kledtest.cpp (581 bytes, patch)
2005-03-03 16:34 UTC, Andreas Vinsander
Details

Note You need to log in before you can comment on or make changes to this bug.
Description aaron667 2005-01-04 09:23:41 UTC
Version:            (using KDE KDE 3.3.2)
Installed from:    Compiled From Sources
Compiler:          gcc 3.4.3 
OS:                Linux

trying to compile kdelibs I fail upon

i686-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I../../dcop -I../../kio/kssl -I../../kdefx -I../../kdecore -I../../kdeui -I../../dcop -I../../libltdl -I../../kdefx -I../../kdecore -I../../kdeui -I../../kio -I../../kio/kio -I../../kio/kfile -I../.. -I/usr/qt/3/include -I/usr/X11R6/include -I/usr/kde/3.3/include   -DQT_THREAD_SUPPORT  -D_REENTRANT  -Wnon-virtual-dtor-Wno-long-long -Wundef -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts -Wall -W -Wpointer-arith -Wwrite-strings -DNDEBUG -DNO_DEBUG -O2 -O3 -march=i686 -funroll-loops -pipe -Wformat-security -Wmissing-format-attribute -fno-exceptions -fno-check-new -fno-common  -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION  -c -o kledtest.o kledtest.cpp
kledtest.cpp: In constructor `KLedTest::KLedTest(QWidget*)':
kledtest.cpp:53: error: ISO C++ forbids cast to non-reference type used as lvalue
kledtest.cpp:55: error: ISO C++ forbids cast to non-reference type used as lvalue
kledtest.cpp: In function `int main(int, char**)':
kledtest.cpp:137: warning: `__comp_ctor' is deprecated (declared at ../../kdecore/kapplication.h:198)
make[3]: *** [kledtest.o] Error 1
make[3]: Leaving directory `/var/tmp/portage/kdelibs-3.3.2-r2/work/kdelibs-3.3.2/kdeui/tests'
make[2]: *** [check-am] Error 2
make[2]: Leaving directory `/var/tmp/portage/kdelibs-3.3.2-r2/work/kdelibs-3.3.2/kdeui/tests'
make[1]: *** [check-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/kdelibs-3.3.2-r2/work/kdelibs-3.3.2/kdeui'
make: *** [check-recursive] Error 1
Comment 1 Dominik Stadler 2005-02-17 21:53:21 UTC
This happens if you run "make test", look at http://bugs.gentoo.org/show_bug.cgi?id=74058 for more information.
Comment 2 aaron667 2005-02-23 20:39:03 UTC
wow.. now we have a cyclic redirection...

anyway.. I'm one of the bug reporters on gentoo-bugs...
so I am aware the bug has been reported there...

still it remains a KDE bug if "make test" fails...
Comment 3 Stephan Kulow 2005-02-24 14:29:14 UTC
the redirection in #1 was not to you, but a pointer to the developers ;)

Otherwise we would have closed the bug as INVALID
Comment 4 Andreas Vinsander 2005-03-03 16:34:21 UTC
Created attachment 9952 [details]
Patch for kledtest.cpp

This patch makes 'make check' continue past compilation of kledtest.cpp
Is it the right way to go?
Comment 5 Andreas Vinsander 2005-03-03 16:41:26 UTC
I think it would be even better if the declaration of the enums looked something like this:

enum Shape { Rectangular, Circular, MaxShape };

and

enum Look { Flat, Raised, Sunken, MaxLook };

And making kledtest.cpp for loops look like this:

for(shape=(KLed::Shape)0; shape < KLed::MaxShape; shape=(KLed::Shape)(shape+1))

and

for(look=(KLed::Look)0; look < KLed::MaxLook; look=(KLed::Look)(look+1))

Does it make sense?
Comment 6 Andreas Vinsander 2005-03-16 12:45:30 UTC
(Haven't yet seen any activity when lookin at the source through the kde viewcvs)
I realize that this is a low-prioritized bug... but its still annoying to not be able to do 'make check' without first patching the source by hand.
Is there some way I can help out... or is the supplied patch enough? 
Comment 7 Caleb Tennis 2005-07-14 01:54:58 UTC
seems to be fixed now in trunk and in the 3.4 branch.