[Mesa-dev] [PATCH 1/2] libdrm: fix compile warning

Jan Engelhardt jengelh at inai.de
Sun Jul 8 18:46:33 PDT 2012


xf86drmSL.c:273:8: warning: 'update[0]' is used uninitialized in this function [-Wuninitialized]

I have no idea what to really do here. The code is essentially unused
because update[0] is always NULL.
---
 xf86drmSL.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/xf86drmSL.c b/xf86drmSL.c
index acddb54..94be22f 100644
--- a/xf86drmSL.c
+++ b/xf86drmSL.c
@@ -264,7 +264,7 @@ int drmSLLookupNeighbors(void *l, unsigned long key,
 			 unsigned long *next_key, void **next_value)
 {
     SkipListPtr   list = (SkipListPtr)l;
-    SLEntryPtr    update[SL_MAX_LEVEL + 1];
+    SLEntryPtr    update[SL_MAX_LEVEL + 1] = {0};
     int           retcode = 0;
 
     *prev_key   = *next_key   = key;
-- 
1.7.7



More information about the mesa-dev mailing list