tests/modetest: silence compiler warning about uninitialised variables
authorEmil Velikov <emil.l.velikov@gmail.com>
Thu, 29 Aug 2013 20:31:51 +0000 (21:31 +0100)
committerRob Clark <robclark@freedesktop.org>
Fri, 30 Aug 2013 15:37:05 +0000 (11:37 -0400)
The compiler is unaware of that we have at least one crts/connector/plane
thus it complains that some of our variables will be used uninitialised.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Rob Clark <robdclark@gmail.com>
tests/modetest/modetest.c

index 79b4f04..f0ed56b 100644 (file)
@@ -781,7 +781,7 @@ static struct crtc *pipe_find_crtc(struct device *dev, struct pipe_arg *pipe)
 
 static int pipe_find_crtc_and_mode(struct device *dev, struct pipe_arg *pipe)
 {
-       drmModeModeInfo *mode;
+       drmModeModeInfo *mode = NULL;
        int i;
 
        pipe->mode = NULL;
@@ -838,8 +838,8 @@ struct property_arg {
 
 static void set_property(struct device *dev, struct property_arg *p)
 {
-       drmModeObjectProperties *props;
-       drmModePropertyRes **props_info;
+       drmModeObjectProperties *props = NULL;
+       drmModePropertyRes **props_info = NULL;
        const char *obj_type;
        int ret;
        int i;