From: "Zanoni, Paulo R" <paulo.r.zanoni@intel.com>
To: "Wood, Thomas" <thomas.wood@intel.com>,
"intel-gfx@lists.freedesktop.org"
<intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH i-g-t 8/8] tests/kms_fbc_crc: ensure context is initialized correctly
Date: Wed, 4 Nov 2015 19:36:04 +0000 [thread overview]
Message-ID: <1446665762.2911.21.camel@intel.com> (raw)
In-Reply-To: <1446464924-20878-8-git-send-email-thomas.wood@intel.com>
Em Seg, 2015-11-02 às 11:48 +0000, Thomas Wood escreveu:
> Initialization was included in commit a976d7e (tests/kms_fbc_crc:
> refactor context
> handling code), but won't be executed since it is declared before the
> first
> label within a switch statement.
>
> kms_fbc_crc.c:178:2: warning: ‘context’ may be used uninitialized in
> this function [-Wmaybe-uninitialized]
> rendercopy(batch, context,
> ^
> kms_fbc_crc.c:271:22: note: ‘context’ was declared here
> drm_intel_context *context = NULL;
I don't see these warnings here. Which compiler do you use?
pzanoni@panetone:~/nfs/intel-gpu-tools/tests$ gcc --version
gcc (Debian 5.2.1-22) 5.2.1 20151010
The weird part is that it was initialized during the declaration, so
the declaration is valid yet the initialization is not? Anyway, your
change removes the ambiguity of the situation and avoid citations of
the C standard, so:
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
>
> ^
> Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
> Signed-off-by: Thomas Wood <thomas.wood@intel.com>
> ---
> tests/kms_fbc_crc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tests/kms_fbc_crc.c b/tests/kms_fbc_crc.c
> index d580a94..02e95e5 100644
> --- a/tests/kms_fbc_crc.c
> +++ b/tests/kms_fbc_crc.c
> @@ -255,6 +255,7 @@ static void test_crc(data_t *data, enum test_mode
> mode)
> {
> uint32_t crtc_id = data->output->config.crtc->crtc_id;
> uint32_t handle = data->fb[0].gem_handle;
> + drm_intel_context *context = NULL;
>
> igt_assert(fbc_enabled(data));
>
> @@ -268,7 +269,6 @@ static void test_crc(data_t *data, enum test_mode
> mode)
> }
>
> switch (mode) {
> - drm_intel_context *context = NULL;
> case TEST_PAGE_FLIP:
> break;
> case TEST_MMAP_CPU:
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2015-11-04 19:36 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-02 11:48 [PATCH i-g-t 1/8] kms_force_connector: use comparison macros to make debug output clearer Thomas Wood
2015-11-02 11:48 ` [PATCH i-g-t 2/8] lib: highlight subtest results on terminals Thomas Wood
2015-11-04 19:58 ` Paulo Zanoni
2015-11-05 15:32 ` Morton, Derek J
2015-11-09 17:17 ` [PATCH i-g-t] lib: add a environment variable to control output Thomas Wood
2015-11-09 20:58 ` Chris Wilson
2015-11-10 10:43 ` Thomas Wood
2015-11-11 10:09 ` Morton, Derek J
2015-11-02 11:48 ` [PATCH i-g-t 3/8] Add missing noreturn attribute to various functions Thomas Wood
2015-11-02 11:48 ` [PATCH i-g-t 4/8] tests: remove unnecessary igt_exit calls Thomas Wood
2015-11-02 11:48 ` [PATCH i-g-t 5/8] tests: remove duplicate struct member initializers Thomas Wood
2015-11-02 11:48 ` [PATCH i-g-t 6/8] Fix comparison of unsigned integers Thomas Wood
2015-11-02 11:48 ` [PATCH i-g-t 7/8] lib: add PIPE_ANY to the pipe enum Thomas Wood
2015-11-02 11:48 ` [PATCH i-g-t 8/8] tests/kms_fbc_crc: ensure context is initialized correctly Thomas Wood
2015-11-04 19:36 ` Zanoni, Paulo R [this message]
2015-11-04 20:00 ` Ville Syrjälä
2015-11-09 14:50 ` Thomas Wood
2015-11-02 17:13 ` [PATCH i-g-t 1/8] kms_force_connector: use comparison macros to make debug output clearer Thomas Wood
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=1446665762.2911.21.camel@intel.com \
--to=paulo.r.zanoni@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=thomas.wood@intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox