summaryrefslogtreecommitdiff
path: root/tests/kms_atomic.c
diff options
context:
space:
mode:
authorAshutosh Dixit <ashutosh.dixit@intel.com>2021-01-29 22:44:21 -0800
committerChris Wilson <chris@chris-wilson.co.uk>2021-01-30 14:39:00 +0000
commite02612921a4e95aef3a368e7468f4337c9dcee7d (patch)
tree7b8feaa11b5787c2b78c362222e0e99b30c865e4 /tests/kms_atomic.c
parentfdc23507d022b68443121ec2c1a951af27c87240 (diff)
meson: Turn on -Werror
We can choose which compile warnings to enable, but once they are enabled treat all warnings as error. This enforces stricter checks against compile warnings creeping in. v2: Fix redefinition warning errors from i915/gem_userptr_blits v3: Fix the even more pedantic clang compilation v4: Do not alter whitespace in lib/tests/igt_describe! Note: clang does not build assembler/ Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'tests/kms_atomic.c')
-rw-r--r--tests/kms_atomic.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/kms_atomic.c b/tests/kms_atomic.c
index fa6190c9..2965b350 100644
--- a/tests/kms_atomic.c
+++ b/tests/kms_atomic.c
@@ -448,11 +448,11 @@ plane_immutable_zpos(igt_display_t *display, igt_pipe_t *pipe,
for (int i = 0; i < n_planes - 1; i++) {
igt_plane_t *plane_lower, *plane_upper;
- if (plane_ptr[i] != NULL)
- plane_lower = plane_ptr[i];
- else
+ if (plane_ptr[i] == NULL)
continue;
+ plane_lower = plane_ptr[i];
+ plane_upper = NULL;
while (i < (n_planes - 1)) {
if (plane_ptr[i + 1] != NULL) {
plane_upper = plane_ptr[i + 1];
@@ -462,9 +462,11 @@ plane_immutable_zpos(igt_display_t *display, igt_pipe_t *pipe,
continue;
}
}
+ if (!plane_upper)
+ continue;
if ((plane_upper->type == DRM_PLANE_TYPE_CURSOR) ||
- (plane_lower->type == DRM_PLANE_TYPE_CURSOR))
+ (plane_lower->type == DRM_PLANE_TYPE_CURSOR))
continue;
igt_plane_set_position(plane_lower, 0, 0);