All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rob Clark <robdclark@gmail.com>
To: Emil Velikov <emil.l.velikov@gmail.com>
Cc: "dri-devel@lists.freedesktop.org" <dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH 3/6] tests/modetest: silence compiler warning about uninitialised variables
Date: Fri, 30 Aug 2013 11:21:56 -0400	[thread overview]
Message-ID: <CAF6AEGs2J2pXWNUfMW59LOQx909fj_cXNLxC_gucG-VR0z5bsA@mail.gmail.com> (raw)
In-Reply-To: <1377808314-30699-4-git-send-email-emil.l.velikov@gmail.com>

On Thu, Aug 29, 2013 at 4:31 PM, Emil Velikov <emil.l.velikov@gmail.com> wrote:
> 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>

> ---
>
> 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
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2013-08-30 15:21 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 ` [PATCH 3/6] tests/modetest: silence compiler warning about uninitialised variables Emil Velikov
2013-08-30 15:21   ` Rob Clark [this message]
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=CAF6AEGs2J2pXWNUfMW59LOQx909fj_cXNLxC_gucG-VR0z5bsA@mail.gmail.com \
    --to=robdclark@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=emil.l.velikov@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.