From: Emil Velikov <emil.l.velikov@gmail.com>
To: dri-devel@lists.freedesktop.org
Cc: emil.l.velikov@gmail.com
Subject: [PATCH 3/6] tests/modetest: silence compiler warning about uninitialised variables
Date: Thu, 29 Aug 2013 21:31:51 +0100 [thread overview]
Message-ID: <1377808314-30699-4-git-send-email-emil.l.velikov@gmail.com> (raw)
In-Reply-To: <1377808314-30699-1-git-send-email-emil.l.velikov@gmail.com>
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>
---
This patch looks like a rather silly thing to do, although it seems like
the only was to silence the gcc compiler
---
tests/modetest/modetest.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tests/modetest/modetest.c b/tests/modetest/modetest.c
index f96b930..ed604b4 100644
--- a/tests/modetest/modetest.c
+++ b/tests/modetest/modetest.c
@@ -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;
--
1.8.4
next prev parent reply other threads:[~2013-08-29 20:32 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1377808314-30699-1-git-send-email-emil.l.velikov@gmail.com>
2013-08-29 20:31 ` [PATCH 1/6] tests/drmstat: remove the test Emil Velikov
2013-08-29 20:31 ` [PATCH 2/6] tests/*version: add missing string.h header Emil Velikov
2013-08-30 15:23 ` Rob Clark
2013-08-29 20:31 ` Emil Velikov [this message]
2013-08-30 15:21 ` [PATCH 3/6] tests/modetest: silence compiler warning about uninitialised variables Rob Clark
2013-08-29 20:31 ` [PATCH 4/6] freedreno: use local drm.h over the system one Emil Velikov
2013-08-29 20:31 ` [PATCH 5/6] freedreno: set automake options to include subdir-objects Emil Velikov
2013-08-30 15:19 ` Rob Clark
2013-08-29 20:31 ` [PATCH 6/6] intel: Update package name and description in libdrm_intel.pc Emil Velikov
2013-08-30 16:00 ` Damien Lespiau
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1377808314-30699-4-git-send-email-emil.l.velikov@gmail.com \
--to=emil.l.velikov@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox