diff options
author | Jaroslav Kysela <perex@perex.cz> | 2022-05-05 14:37:52 +0200 |
---|---|---|
committer | Jaroslav Kysela <perex@perex.cz> | 2022-05-05 14:38:09 +0200 |
commit | f1fa7ea07768bd5dbe15462ef734b28380a12a43 (patch) | |
tree | 84c56914688bdbd840046b02e66a75d79b2f8c5a | |
parent | 859448f01033b40feebf9a0aab467ba57a655b5b (diff) | |
download | alsa-lib-f1fa7ea07768bd5dbe15462ef734b28380a12a43.tar.gz |
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 <perex@perex.cz>
-rw-r--r-- | src/control/control_shm.c | 2 |
1 files changed, 1 insertions, 1 deletions
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) |