From: Paul Eggert Date: Mon, 13 Jun 2011 06:49:00 +0000 (-0700) Subject: * sound.c (Fplay_sound_internal): Remove cast to unsigned long. X-Git-Tag: emacs-pretest-24.0.90~104^2~548^2~24 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=96f53c6c3d6d31bc81187b5a5fdb3ec942cd6f51;p=emacs.git * sound.c (Fplay_sound_internal): Remove cast to unsigned long. It's more likely to cause problems (due to unsigned overflow) than to cure them. --- diff --git a/src/ChangeLog b/src/ChangeLog index 6562df06471..686c728f0a3 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,9 @@ 2011-06-13 Paul Eggert + * sound.c (Fplay_sound_internal): Remove cast to unsigned long. + It's more likely to cause problems (due to unsigned overflow) + than to cure them. + * dired.c (Ffile_attributes): Don't use 32-bit hack on 64-bit hosts. * unexelf.c (unexec): Don't assume BSS addr fits in unsigned. diff --git a/src/sound.c b/src/sound.c index 794c8e64e54..0e71e66352e 100644 --- a/src/sound.c +++ b/src/sound.c @@ -1447,7 +1447,7 @@ Internal use only, use `play-sound' instead. */) } else if (FLOATP (attrs[SOUND_VOLUME])) { - ui_volume_tmp = (unsigned long) XFLOAT_DATA (attrs[SOUND_VOLUME]) * 100; + ui_volume_tmp = XFLOAT_DATA (attrs[SOUND_VOLUME]) * 100; } /* Based on some experiments I have conducted, a value of 100 or less