Bug#297285: zed: FTBFS (amd64/gcc-4.0): cast from 'int*' to 'int' loses precision
Package: zed
Severity: normal
Tags: patch
When building 'zed' on amd64 with gcc-4.0,
I get the following error:
g++ -O2 -Wall -o lowl.o -c lowl.cc
lowl.cc: In function 'int exectst(int*)':
lowl.cc:1462: error: cast from 'int*' to 'int' loses precision
lowl.cc:1471: error: cast from 'int*' to 'unsigned int' loses precision
make[1]: *** [lowl.o] Error 1
make[1]: Leaving directory `/zed-1.0.5'
make: *** [build.stamp] Error 2
With the attached patch 'zed' can be compiled
on amd64 using gcc-4.0.
Regards
Andreas Jochens
diff -urN ../tmp-orig/zed-1.0.5/lowl.cc ./lowl.cc
--- ../tmp-orig/zed-1.0.5/lowl.cc 2000-04-05 11:47:41.000000000 +0200
+++ ./lowl.cc 2005-02-28 14:43:43.070936729 +0100
@@ -1459,7 +1459,7 @@
*dato positivo setta sp=dato...
*/
- switch((int)dato)
+ switch((long)dato)
{
case 0 : ignore=0; return(0);
case 1 : ignore=1; return(0);
@@ -1468,7 +1468,7 @@
case 4 : sp=0; ssp=0; lstr=0; return(0);
}
- if (((unsigned int)dato)>10 && (*dato)>0)
+ if (((unsigned long)dato)>10 && (*dato)>0)
{
sp=config.cmds+(*dato-1); lstr=0; ssp=0;
return(0);
Reply to: