* sound.c (wav_play, au_play, Fplay_sound_internal):
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 18 Mar 2011 06:27:08 +0000 (23:27 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 18 Mar 2011 06:27:08 +0000 (23:27 -0700)
Fix pointer signedness.

src/ChangeLog
src/sound.c

index aa9de9d..aab2982 100644 (file)
@@ -1,5 +1,8 @@
 2011-03-18  Paul Eggert  <eggert@cs.ucla.edu>
 
+       * 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.
index 3a1668e..47d4c32 100644 (file)
@@ -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 */
-