From f1fa7ea07768bd5dbe15462ef734b28380a12a43 Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Thu, 5 May 2022 14:37:52 +0200 Subject: [PATCH] control: shm - initialize write buffer MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit ccontrol_shm.c: In function ‘snd_ctl_shm_action’: control_shm.c:54:23: error: invalid initializer 54 | char buf[1] = 0; | ^ Signed-off-by: Jaroslav Kysela --- src/control/control_shm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/control/control_shm.c b/src/control/control_shm.c index c5723549..d7297e6c 100644 --- a/src/control/control_shm.c +++ b/src/control/control_shm.c @@ -51,7 +51,7 @@ static int snd_ctl_shm_action(snd_ctl_t *ctl) { snd_ctl_shm_t *shm = ctl->private_data; int err; - char buf[1]; + char buf[1] = {0}; volatile snd_ctl_shm_ctrl_t *ctrl = shm->ctrl; err = write(shm->socket, buf, 1); if (err != 1) -- 2.47.1