From 500603320d95a06f8dfb25ab3f4447e115fea56d Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 17 Mar 2011 23:27:08 -0700 Subject: [PATCH] * sound.c (wav_play, au_play, Fplay_sound_internal): Fix pointer signedness. --- src/ChangeLog | 3 +++ src/sound.c | 7 +++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index aa9de9deacb..aab298274cc 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2011-03-18 Paul Eggert + * sound.c (wav_play, au_play, Fplay_sound_internal): + Fix pointer signedness. + * region-cache.c (insert_cache_boundary): Redo var to avoid shadowing. * region-cache.h (pp_cache): New decl, for gcc -Wmissing-prototypes. diff --git a/src/sound.c b/src/sound.c index 3a1668e4903..47d4c325997 100644 --- a/src/sound.c +++ b/src/sound.c @@ -595,7 +595,7 @@ wav_play (struct sound *s, struct sound_device *sd) files I found so far. If someone feels inclined to implement the whole RIFF-WAVE spec, please do. */ if (STRINGP (s->data)) - sd->write (sd, SDATA (s->data) + sizeof *header, + sd->write (sd, SSDATA (s->data) + sizeof *header, SBYTES (s->data) - sizeof *header); else { @@ -686,7 +686,7 @@ au_play (struct sound *s, struct sound_device *sd) sd->configure (sd); if (STRINGP (s->data)) - sd->write (sd, SDATA (s->data) + header->data_offset, + sd->write (sd, SSDATA (s->data) + header->data_offset, SBYTES (s->data) - header->data_offset); else { @@ -1410,7 +1410,7 @@ Internal use only, use `play-sound' instead. */) { int len = SCHARS (attrs[SOUND_DEVICE]); current_sound_device->file = (char *) alloca (len + 1); - strcpy (current_sound_device->file, SDATA (attrs[SOUND_DEVICE])); + strcpy (current_sound_device->file, SSDATA (attrs[SOUND_DEVICE])); } if (INTEGERP (attrs[SOUND_VOLUME])) @@ -1498,4 +1498,3 @@ init_sound (void) } #endif /* HAVE_SOUND */ - -- 2.39.2