[Bug 74972] noatun does not play any sound on Linux/AMD64

Stephan Kulow coolo at kde.org
Thu Apr 1 11:00:59 BST 2004


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
      
http://bugs.kde.org/show_bug.cgi?id=74972      
coolo kde org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED



------- Additional Comments From coolo kde org  2004-04-01 12:00 -------
CVS commit by coolo: 

gcc on 64bit architectures can't know you see long as 32bit (patch by Michael Matz)
CCMAIL: matz kde org
CCMAIL: 74972-done bugs kde org


  M +5 -5      buffer.cc   1.29


--- arts/mcop/buffer.cc  #1.28:1.29
 @ -88,7 +88,6  @ void Buffer::writeFloat(float f) {
         // FIXME: on some machines this may fail badly (there is explicit
         // float marshalling and demarshalling code in mico/orb/util.cc)
-
-        long *f_as_long = (long *)&f;
-        writeLong(*f_as_long);
+        union { float f; long l; } u = {f};
+        writeLong(u.l);
 }
 
 @ -253,7 +252,8  @ float Buffer::readFloat()
 {
         // FIXME: see writeFloat()
-        long f_as_long = readLong();
+        union {float f; long l; } u;
+        u.l = readLong();
 
-        if(!_readError) return *(float *)&f_as_long;
+        if(!_readError) return u.f;
         return 0.0;
 }



More information about the kde-multimedia mailing list