wayland-server: Fix a uninitialized warning from clang
authorAaron Faanes <dafrito@gmail.com>
Wed, 28 Aug 2013 22:43:34 +0000 (17:43 -0500)
committerKristian Høgsberg <krh@bitplanet.net>
Wed, 11 Sep 2013 17:42:37 +0000 (10:42 -0700)
This warning is unnecessary, since the pointer in question is only used
for pointer arithmetic, but setting it explicitly to NULL doesn't hurt.

src/wayland-server.c

index a1d69e5..d7c58b9 100644 (file)
@@ -501,7 +501,7 @@ wl_resource_get_link(struct wl_resource *resource)
 WL_EXPORT struct wl_resource *
 wl_resource_from_link(struct wl_list *link)
 {
-       struct wl_resource *resource;
+       struct wl_resource *resource = NULL;
 
        return wl_container_of(link, resource, link);
 }