Package: turqstat
Severity: normal
Tags: patch

When building 'turqstat' on amd64 with gcc-4.0,
I get the following error:

g++ -g -O2 -I. -Wall -c ./turqstat.cpp
In file included from 
/usr/lib/gcc/x86_64-linux/4.0.0/../../../../include/c++/4.0.0/backward/iostream.h:31,
                 from ./turqstat.cpp:24:
/usr/lib/gcc/x86_64-linux/4.0.0/../../../../include/c++/4.0.0/backward/backward_warning.h:32:2:
 warning: #warning This file includes at least one deprecated or antiquated 
header. Please consider using one of the 32 headers found in section 17.4.1.2 
of the C++ standard. Examples include substituting the <X> header for the <X.h> 
header for C++ includes, or <iostream> instead of the deprecated header 
<iostream.h>. To disable this warning use -Wno-deprecated.
./output.h:27: error: using typedef-name 'std::ostream' after 'class'
/usr/lib/gcc/x86_64-linux/4.0.0/../../../../include/c++/4.0.0/iosfwd:138: 
error: 'std::ostream' has a previous declaration here
./turqstat.cpp: In function 'int main(int, char**)':
./turqstat.cpp:267: warning: right-hand operand of comma has no effect
make[1]: *** [turqstat.o] Error 1
make[1]: Leaving directory `/turqstat-2.2.2'
make: *** [build-stamp] Error 2

With the attached patch 'turqstat' can be compiled
on amd64 using gcc-4.0.

The attached patch includes a patch which was already necessary for gcc-3.4.

Regards
Andreas Jochens

diff -urN ../tmp-orig/turqstat-2.2.2/output.h ./output.h
--- ../tmp-orig/turqstat-2.2.2/output.h 2001-10-27 12:56:39.000000000 +0200
+++ ./output.h  2005-02-09 14:54:21.216210310 +0100
@@ -24,7 +24,6 @@
 using namespace std;
 #endif
 
-class ostream;
 
 /**
  * Class used to display messages.
diff -urN ../tmp-orig/turqstat-2.2.2/output.cpp ./output.cpp
--- ../tmp-orig/turqstat-2.2.2/output.cpp       2001-10-27 12:56:39.000000000 
+0200
+++ ./output.cpp        2005-02-09 14:53:40.540076847 +0100
@@ -115,8 +115,8 @@
 }
 
 static string GetMessage(TDisplay::errormessages_e errormessage)
-    return s;
 {
+    string s;
     switch (errormessage)
     {
         case TDisplay::out_of_memory:
@@ -255,4 +255,5 @@
             s = "NNTP communication problem";
             break;
     }
+    return s;
 }
diff -urN ../tmp-orig/turqstat-2.2.2/outputqt.cpp ./outputqt.cpp
--- ../tmp-orig/turqstat-2.2.2/outputqt.cpp     2001-10-27 14:49:38.000000000 
+0200
+++ ./outputqt.cpp      2005-02-09 14:53:40.541076653 +0100
@@ -133,8 +133,8 @@
 }
 
 static QString GetMessage(TDisplay::errormessages_e errormessage)
-    return s;
 {
+    QString s;
     switch (errormessage)
     {
         case TDisplay::out_of_memory:
@@ -296,4 +296,5 @@
             s = qApp->translate("TDisplay", "NNTP communication problem");
             break;
     }
+    return s;
 }
diff -urN ../tmp-orig/turqstat-2.2.2/qtlist.cpp ./qtlist.cpp
--- ../tmp-orig/turqstat-2.2.2/qtlist.cpp       2001-09-19 20:15:21.000000000 
+0200
+++ ./qtlist.cpp        2005-02-09 14:53:40.541076653 +0100
@@ -409,11 +409,11 @@
 }
 
 QString TopListWindow::percentString(int numerator, int denumerator)
-    return s;
 {
     float percent =
         (100.0 * numerator) / (float) denumerator;
-    s = QString::number(percent, 'f', 2) + "%";
+    QString s = QString::number(percent, 'f', 2) + "%";
+    return s;
 }
 
 void TopListWindow::saveToFile()


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to