From 96f53c6c3d6d31bc81187b5a5fdb3ec942cd6f51 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 12 Jun 2011 23:49:00 -0700 Subject: [PATCH] * 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. --- src/ChangeLog | 4 ++++ src/sound.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) 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 -- 2.39.2