GNOME Bugzilla – Bug 166689
cast from 'void*' to 'int' loses precision
Last modified: 2005-02-10 19:00:52 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; }
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)