From: Juanma Barranquero Date: Wed, 19 Jun 2013 14:20:26 +0000 (+0200) Subject: src/sound.c: Silence some warnings. X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~2016^2~39 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=983aeb9affdeee084f1e0ffa683b0e944243cd2e;p=emacs.git src/sound.c: Silence some warnings. (string_default): Move to !WINDOWSNT section. (Fplay_sound_internal) [WINDOWSNT]: Remove i_result to avoid warning. --- diff --git a/src/ChangeLog b/src/ChangeLog index ecc9ff99e82..530c4d6f0eb 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2013-06-19 Juanma Barranquero + + * sound.c (string_default): Move to !WINDOWSNT section. + (Fplay_sound_internal) [WINDOWSNT]: Remove i_result to avoid warning. + 2013-06-19 Paul Eggert * sound.c: Integer cleanups. diff --git a/src/sound.c b/src/sound.c index e640dace40f..7f0ede5b398 100644 --- a/src/sound.c +++ b/src/sound.c @@ -325,15 +325,6 @@ sound_warning (const char *msg) } -/* Return S's value as a string if S is a string, otherwise DEFAULT_VALUE. */ - -static char const * -string_default (Lisp_Object s, char const *default_value) -{ - return STRINGP (s) ? SSDATA (s) : default_value; -} - - /* Parse sound specification SOUND, and fill ATTRS with what is found. Value is non-zero if SOUND Is a valid sound specification. A valid sound specification is a list starting with the symbol @@ -426,6 +417,15 @@ parse_sound (Lisp_Object sound, Lisp_Object *attrs) /* BEGIN: Non Windows functions */ #ifndef WINDOWSNT +/* Return S's value as a string if S is a string, otherwise DEFAULT_VALUE. */ + +static char const * +string_default (Lisp_Object s, char const *default_value) +{ + return STRINGP (s) ? SSDATA (s) : default_value; +} + + /* Find out the type of the sound file whose file descriptor is FD. S is the sound file structure to fill in. */ @@ -1335,7 +1335,6 @@ Internal use only, use `play-sound' instead. */) char * psz_file = NULL; unsigned long ui_volume_tmp = UINT_MAX; unsigned long ui_volume = UINT_MAX; - int i_result = 0; #endif /* WINDOWSNT */ /* Parse the sound specification. Give up if it is invalid. */ @@ -1430,7 +1429,7 @@ Internal use only, use `play-sound' instead. */) { ui_volume = ui_volume_tmp * (UINT_MAX / 100); } - i_result = do_play_sound (psz_file, ui_volume); + do_play_sound (psz_file, ui_volume); #endif /* WINDOWSNT */