diff options
| author | Juanma Barranquero | 2013-06-19 16:20:26 +0200 |
|---|---|---|
| committer | Juanma Barranquero | 2013-06-19 16:20:26 +0200 |
| commit | 983aeb9affdeee084f1e0ffa683b0e944243cd2e (patch) | |
| tree | bcd00dfedbd719ddba652c3c21ef9c3035a3ab53 /src | |
| parent | 9716fedb62698b1f27e51a1dd185a612cbb4963a (diff) | |
| download | emacs-983aeb9affdeee084f1e0ffa683b0e944243cd2e.tar.gz emacs-983aeb9affdeee084f1e0ffa683b0e944243cd2e.zip | |
src/sound.c: Silence some warnings.
(string_default): Move to !WINDOWSNT section.
(Fplay_sound_internal) [WINDOWSNT]: Remove i_result to avoid warning.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/sound.c | 21 |
2 files changed, 15 insertions, 11 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index ecc9ff99e82..530c4d6f0eb 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2013-06-19 Juanma Barranquero <lekktu@gmail.com> | ||
| 2 | |||
| 3 | * sound.c (string_default): Move to !WINDOWSNT section. | ||
| 4 | (Fplay_sound_internal) [WINDOWSNT]: Remove i_result to avoid warning. | ||
| 5 | |||
| 1 | 2013-06-19 Paul Eggert <eggert@cs.ucla.edu> | 6 | 2013-06-19 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 7 | ||
| 3 | * sound.c: Integer cleanups. | 8 | * 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) | |||
| 325 | } | 325 | } |
| 326 | 326 | ||
| 327 | 327 | ||
| 328 | /* Return S's value as a string if S is a string, otherwise DEFAULT_VALUE. */ | ||
| 329 | |||
| 330 | static char const * | ||
| 331 | string_default (Lisp_Object s, char const *default_value) | ||
| 332 | { | ||
| 333 | return STRINGP (s) ? SSDATA (s) : default_value; | ||
| 334 | } | ||
| 335 | |||
| 336 | |||
| 337 | /* Parse sound specification SOUND, and fill ATTRS with what is | 328 | /* Parse sound specification SOUND, and fill ATTRS with what is |
| 338 | found. Value is non-zero if SOUND Is a valid sound specification. | 329 | found. Value is non-zero if SOUND Is a valid sound specification. |
| 339 | A valid sound specification is a list starting with the symbol | 330 | A valid sound specification is a list starting with the symbol |
| @@ -426,6 +417,15 @@ parse_sound (Lisp_Object sound, Lisp_Object *attrs) | |||
| 426 | /* BEGIN: Non Windows functions */ | 417 | /* BEGIN: Non Windows functions */ |
| 427 | #ifndef WINDOWSNT | 418 | #ifndef WINDOWSNT |
| 428 | 419 | ||
| 420 | /* Return S's value as a string if S is a string, otherwise DEFAULT_VALUE. */ | ||
| 421 | |||
| 422 | static char const * | ||
| 423 | string_default (Lisp_Object s, char const *default_value) | ||
| 424 | { | ||
| 425 | return STRINGP (s) ? SSDATA (s) : default_value; | ||
| 426 | } | ||
| 427 | |||
| 428 | |||
| 429 | /* Find out the type of the sound file whose file descriptor is FD. | 429 | /* Find out the type of the sound file whose file descriptor is FD. |
| 430 | S is the sound file structure to fill in. */ | 430 | S is the sound file structure to fill in. */ |
| 431 | 431 | ||
| @@ -1335,7 +1335,6 @@ Internal use only, use `play-sound' instead. */) | |||
| 1335 | char * psz_file = NULL; | 1335 | char * psz_file = NULL; |
| 1336 | unsigned long ui_volume_tmp = UINT_MAX; | 1336 | unsigned long ui_volume_tmp = UINT_MAX; |
| 1337 | unsigned long ui_volume = UINT_MAX; | 1337 | unsigned long ui_volume = UINT_MAX; |
| 1338 | int i_result = 0; | ||
| 1339 | #endif /* WINDOWSNT */ | 1338 | #endif /* WINDOWSNT */ |
| 1340 | 1339 | ||
| 1341 | /* Parse the sound specification. Give up if it is invalid. */ | 1340 | /* Parse the sound specification. Give up if it is invalid. */ |
| @@ -1430,7 +1429,7 @@ Internal use only, use `play-sound' instead. */) | |||
| 1430 | { | 1429 | { |
| 1431 | ui_volume = ui_volume_tmp * (UINT_MAX / 100); | 1430 | ui_volume = ui_volume_tmp * (UINT_MAX / 100); |
| 1432 | } | 1431 | } |
| 1433 | i_result = do_play_sound (psz_file, ui_volume); | 1432 | do_play_sound (psz_file, ui_volume); |
| 1434 | 1433 | ||
| 1435 | #endif /* WINDOWSNT */ | 1434 | #endif /* WINDOWSNT */ |
| 1436 | 1435 | ||