Takashi Iwai
79b57fb3f0
- Update to alsa-utils 1.1.0: including all previous fixes, update of topology tool, addition of BAT (Basic Audio Tool) - Split bat subpackage containing BAT - Fix build of bat with old gcc & glibc on SLE11 0001-bat-Avoid-local-signal.h-file.patch 0002-bat-Don-t-pass-incompatible-function-pointers-to-pth.patch - Dropped patches: 0001-amixer-Don-t-set-only-the-first-item-in-sset_enum.patch 0002-amixer-expand-local-storage-for-item-name-according-.patch 0003-alsa-info-Don-t-try-update-when-wget-isn-t-available.patch 0004-aplay-Fix-type-for-signal-flag.patch 0005-aplay-Fix-uninterruptible-aplay.patch 0006-alsactl-terminate-readlink-result-string.patch 0007-speaker-test-Add-option-to-specify-signal-scale.patch 0008-topology-Add-command-line-topology-tool-to-build-top.patch 0009-alsactl-Add-path-condition-to-alsa-store-and-alsa-re.patch 0010-speaker-test-fix-option-ordering.patch 0011-arecord-Remove-only-regular-files.patch 0012-aplay-fix-VU-meter-for-S24_LE-etc-formats.patch 0013-alsactl-Manage-both-save-and-restore-in-a-single-uni.patch OBS-URL: https://build.opensuse.org/request/show/343191 OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/alsa-utils?expand=0&rev=126
54 lines
1.5 KiB
Diff
54 lines
1.5 KiB
Diff
From ed0cce1b6061aade0077982cb5d22fa68ddffd2f Mon Sep 17 00:00:00 2001
|
|
From: Takashi Iwai <tiwai@suse.de>
|
|
Date: Mon, 9 Nov 2015 14:09:50 +0100
|
|
Subject: [PATCH 2/2] bat: Don't pass incompatible function pointers to
|
|
pthread_cleanup_push()
|
|
|
|
pthread_cleanup_push() takes a function pointer for void (void *).
|
|
Although it may work in most cases, we shouldn't pass an incompatible
|
|
function pointer there, as some old gcc complains:
|
|
alsa.c:560: warning: initialization from incompatible pointer type
|
|
alsa.c:562: warning: initialization from incompatible pointer type
|
|
|
|
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
---
|
|
bat/alsa.c | 14 ++++++++++++--
|
|
1 file changed, 12 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/bat/alsa.c b/bat/alsa.c
|
|
index d31a633cf857..5eaa25b61456 100644
|
|
--- a/bat/alsa.c
|
|
+++ b/bat/alsa.c
|
|
@@ -505,6 +505,16 @@ static int read_from_pcm_loop(FILE *fp, int count,
|
|
return 0;
|
|
}
|
|
|
|
+static void pcm_cleanup(void *p)
|
|
+{
|
|
+ snd_pcm_close(p);
|
|
+}
|
|
+
|
|
+static void file_cleanup(void *p)
|
|
+{
|
|
+ fclose(p);
|
|
+}
|
|
+
|
|
/**
|
|
* Record
|
|
*/
|
|
@@ -557,9 +567,9 @@ void *record_alsa(struct bat *bat)
|
|
|
|
pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);
|
|
pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED, NULL);
|
|
- pthread_cleanup_push(snd_pcm_close, sndpcm.handle);
|
|
+ pthread_cleanup_push(pcm_cleanup, sndpcm.handle);
|
|
pthread_cleanup_push(free, sndpcm.buffer);
|
|
- pthread_cleanup_push(fclose, fp);
|
|
+ pthread_cleanup_push(file_cleanup, fp);
|
|
|
|
err = write_wav_header(fp, &wav, bat);
|
|
if (err != 0) {
|
|
--
|
|
2.6.2
|
|
|