[alsa-devel] [PATCH] sound: memalloc.c: Fix build warnings
Fabio Estevam
festevam at gmail.com
Mon Jan 16 04:02:02 CET 2012
Fix the following build warnings:
sound/core/memalloc.c: In function âsnd_mem_proc_writeâ:
sound/core/memalloc.c:426: warning: âvendorâ may be used uninitialized in this function
sound/core/memalloc.c:426: warning: âdeviceâ may be used uninitialized in this function
sound/core/memalloc.c:426: warning: âsizeâ may be used uninitialized in this function
sound/core/memalloc.c:426: warning: âbuffersâ may be used uninitialized in this function
sound/core/memalloc.c:427: warning: âmaskâ may be used uninitialized in this function
Signed-off-by: Fabio Estevam <fabio.estevam at freescale.com>
---
sound/core/memalloc.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/sound/core/memalloc.c b/sound/core/memalloc.c
index 6915692..7dbad80 100644
--- a/sound/core/memalloc.c
+++ b/sound/core/memalloc.c
@@ -423,8 +423,11 @@ static ssize_t snd_mem_proc_write(struct file *file, const char __user * buffer,
return count;
if (strcmp(token, "add") == 0) {
char *endp;
- int vendor, device, size, buffers;
- long mask;
+ int vendor = 0;
+ int device = 0;
+ int size = 0;
+ int buffers = 0;
+ long mask = 0;
int i, alloced;
struct pci_dev *pci;
--
1.7.1
More information about the Alsa-devel
mailing list