Bug#288535: sound-juicer: FTBFS (amd64/gcc-4.0): cast from 'void*' to 'int' loses precision

Andreas Jochens Andreas Jochens <aj@andaco.de>, 288535@bugs.debian.org
Tue, 04 Jan 2005 08:37:46 +0100


Package: sound-juicer
Severity: normal
Tags: patch

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

transport.hxx: In constructor 'Scsi_Command::Scsi_Command(void*)':
transport.hxx:87: error: cast from 'void*' to 'int' loses precision

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

Regards
Andreas Jochens

diff -urN ../tmp-orig/sound-juicer-0.5.15/src/transport.hxx ./src/transport.hxx
--- ../tmp-orig/sound-juicer-0.5.15/src/transport.hxx	2004-11-23 14:54:52.000000000 +0100
+++ ./src/transport.hxx	2005-01-03 23:50:57.090450672 +0100
@@ -84,7 +84,7 @@
 public:
     Scsi_Command()	{ fd=-1, autoclose=1; filename=NULL; }
     Scsi_Command(int f)	{ fd=f,  autoclose=0; filename=NULL; }
-    Scsi_Command(void*f){ fd=(int)f, autoclose=0; filename=NULL; }
+    Scsi_Command(void*f){ fd=(long)f, autoclose=0; filename=NULL; }
     ~Scsi_Command()	{ if (fd>=0 && autoclose) close(fd),fd=-1;
 			  if (filename) free(filename),filename=NULL;
 			}