Package: xdiskusage
Severity: normal
Tags: patch
When building 'xdiskusage' on amd64 with gcc-4.0,
I get the following error:
g++ -Wall -O2 -c xdiskusage.C
xdiskusage.C: In static member function 'static void
OutputWindow::sort_cb(Fl_Widget*, void*)':
xdiskusage.C:974: error: cast from 'void*' to 'int' loses precision
xdiskusage.C: In static member function 'static void
OutputWindow::columns_cb(Fl_Widget*, void*)':
xdiskusage.C:987: error: cast from 'void*' to 'int' loses precision
make[1]: *** [xdiskusage.o] Error 1
make[1]: Leaving directory `/xdiskusage-1.48'
make: *** [debian/stamp-makefile-build] Error 2
With the attached patch 'xdiskusage' can be compiled
on amd64 using gcc-4.0.
Regards
Andreas Jochens
diff -urN ../tmp-orig/xdiskusage-1.48/xdiskusage.C ./xdiskusage.C
--- ../tmp-orig/xdiskusage-1.48/xdiskusage.C 2005-03-03 11:08:13.102276972
+0100
+++ ./xdiskusage.C 2005-03-03 11:08:09.165036932 +0100
@@ -971,7 +971,7 @@
void OutputWindow::sort_cb(Fl_Widget* o, void*v) {
OutputWindow* d = (OutputWindow*)(o->window());
int (*compare)(const Node*, const Node*);
- switch ((int)v) {
+ switch ((long)v) {
case 's': compare = largestfirst; break;
case 'r': compare = smallestfirst; break;
case 'a': compare = alphabetical; break;
@@ -984,7 +984,7 @@
void OutputWindow::columns_cb(Fl_Widget* o, void*v) {
OutputWindow* d = (OutputWindow*)(o->window());
- int n = (int)v;
+ long n = (long)v;
::ncols = n;
if (n == d->ncols) return;
if (d->current_depth > d->root_depth+n-1) {
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]