Bug 70942 - kdetoys/kweather/weatherservice.cpp doesn't compile on Solaris
Summary: kdetoys/kweather/weatherservice.cpp doesn't compile on Solaris
Status: RESOLVED FIXED
Alias: None
Product: kweather-kde3
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Solaris
: NOR normal
Target Milestone: ---
Assignee: geiseri
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-12-20 22:54 UTC by Torsten Kasch
Modified: 2004-01-10 12:59 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
patch for kdetoys/kweather/weatherservice.cpp (1.26 KB, patch)
2003-12-20 22:58 UTC, Torsten Kasch
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Torsten Kasch 2003-12-20 22:54:54 UTC
Version:            (using KDE Devel)
Installed from:    Compiled sources
Compiler:          gcc version 2.95.3 20010315 (release) 
OS:          Solaris

Trying to compile kdetoys on my Solaris 8 x86 box breaks with:

source='weatherservice.cpp' object='weatherservice.o' libtool=no \
depfile='.deps/weatherservice.Po' tmpdepfile='.deps/weatherservice.TPo' \
depmode=gcc /bin/ksh ../admin/depcomp \
g++ -pipe -DHAVE_CONFIG_H -I. -I. -I.. -I/vol/kde-cvs/include -I/vol/qt-3.2.3/include   -I/vol/local/include -I/vol/graphics/include  -DQT_THREAD_SUPPORT  -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DUSE_SOLARIS -DSVR4  -Wnon-virtual-dtor -Wno-long-long -Wundef -Wall -W -Wpointer-arith -Wwrite-strings -DNDEBUG -DNO_DEBUG -O2 -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 weatherservice.o `test -f 'weatherservice.cpp' || echo './'`weatherservice.cpp
weatherservice.cpp: In method `class QStringList WeatherService::findStations(float, float)':
weatherservice.cpp:227: warning: unused parameter `float lon'
weatherservice.cpp:227: warning: unused parameter `float lat'
weatherservice.cpp: In method `class QString WeatherService::sunRiseTime(const QString &)':
weatherservice.cpp:235: parse error before `1'
weatherservice.cpp:240: request for member `computeRiseTime' in `1', which is of non-aggregate type `int'
weatherservice.cpp: In method `class QString WeatherService::sunSetTime(const QString &)':
weatherservice.cpp:249: parse error before `1'
weatherservice.cpp:254: request for member `computeSetTime' in `1', which is of non-aggregate type `int'
make[3]: *** [weatherservice.o] Error 1
make[3]: Leaving directory `/vol/src/kde/cvs/kdetoys/kweather'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/vol/src/kde/cvs/kdetoys/kweather'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/vol/src/kde/cvs/kdetoys'
make: *** [all] Error 2

Obviously, it isn't a good idea to name objects "sun", at least on a Sun platform... ;-)
Comment 1 Torsten Kasch 2003-12-20 22:58:05 UTC
Created attachment 3802 [details]
patch for kdetoys/kweather/weatherservice.cpp

Applying the attached patch resolved this issue for me.
Comment 2 Dirk Mueller 2004-01-10 12:59:10 UTC
Subject: kdetoys/kweather

CVS commit by mueller: 

sun is preprocessor #define on sunos
CCMAIL: 70942-done@bugs.kde.org


  M +5 -5      weatherservice.cpp   1.30


--- kdetoys/kweather/weatherservice.cpp  #1.29:1.30
@@ -233,10 +233,10 @@ QStringList WeatherService::findStations
 QString WeatherService::sunRiseTime(const QString &stationID)
 {
-        Sun sun;
+        Sun thesun;
 
         QString latitude  = stationDB->stationLatitudeFromID(stationID);
         QString longitude = stationDB->stationLongitudeFromID(stationID);
 
-        QTime   rise_time = sun.computeRiseTime(latitude, longitude);
+        QTime   rise_time = thesun.computeRiseTime(latitude, longitude);
 
         kdDebug(12006) << "rise time: " << rise_time << endl;
@@ -247,10 +247,10 @@ QString WeatherService::sunRiseTime(cons
 QString WeatherService::sunSetTime(const QString &stationID)
 {
-        Sun sun;
+        Sun thesun;
 
         QString latitude  = stationDB->stationLatitudeFromID(stationID);
         QString longitude = stationDB->stationLongitudeFromID(stationID);
 
-        QTime   set_time  = sun.computeSetTime(latitude, longitude);
+        QTime   set_time  = thesun.computeSetTime(latitude, longitude);
 
         kdDebug(12006) << "set time: " << set_time << endl;