summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorThomas Wood <thomas.wood@intel.com>2015-11-02 10:29:23 +0000
committerThomas Wood <thomas.wood@intel.com>2015-11-11 14:20:56 +0000
commite9ed1a37fcbb6c3f08bc714cdf5851202f532125 (patch)
tree480a01c3782501ccf7566556d94b797500c07942 /tests
parent0986b432f874db0f263958fa07feb1a83ba1bae4 (diff)
tests/kms_fbc_crc: ensure context is initialized correctly
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; ^ Cc: Paulo Zanoni <paulo.r.zanoni@intel.com> Signed-off-by: Thomas Wood <thomas.wood@intel.com> Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/kms_fbc_crc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/kms_fbc_crc.c b/tests/kms_fbc_crc.c
index d580a945..02e95e5d 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: