From: Jaroslav Kysela Date: Thu, 5 May 2022 12:37:52 +0000 (+0200) Subject: control: shm - initialize write buffer X-Git-Tag: v1.2.7~41 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=f1fa7ea07768bd5dbe15462ef734b28380a12a43;p=alsa-lib.git control: shm - initialize write buffer 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 --- 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)