After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 166689 - cast from 'void*' to 'int' loses precision
cast from 'void*' to 'int' loses precision
Status: RESOLVED FIXED
Product: nautilus-cd-burner
Classification: Deprecated
Component: cd-burner
2.9.x
Other Linux
: Normal normal
: ---
Assigned To: Nautilus CD Burner Maintainers
Nautilus CD Burner Maintainers
Depends on:
Blocks:
 
 
Reported: 2005-02-08 16:42 UTC by Ross Burton
Modified: 2005-02-10 19:00 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Ross Burton 2005-02-08 16:42:48 UTC
From http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=288535, for Sound Juicer
but the original code is in nautilus-cd-burner:

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;
 			}
Comment 1 William Jon McCann 2005-02-10 19:00:52 UTC
There were a few others to fix too.  These are fixed in the upstream version. 
There doesn't seem to be anything that will cause regressions by syncing up with it.

2005-02-10  William Jon McCann  <mccann@jhu.edu>

	* transport.hxx: Sync with upstream dvd+rw-tools 5.21.4.10.8.
	The only difference is the O_EXCL in open in our version.
	(Closes #166689)