Skip to content

Commit 61d9ed3

Browse files
committed
x: fix CI build failure
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
1 parent 3b342af commit 61d9ed3

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/x.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,13 @@ uint32_t x_create_region(xcb_connection_t *c, const region_t *reg) {
394394
}
395395

396396
int nrects;
397-
auto rects = pixman_region32_rectangles(reg, &nrects);
397+
#pragma GCC diagnostic push
398+
// In older pixman versions, pixman_region32_rectangles doesn't take const region_t,
399+
// instead of dealing with this version difference, just suppress the warning.
400+
#pragma GCC diagnostic ignored "-Wdiscarded-qualifiers"
401+
#pragma GCC diagnostic ignored "-Wincompatible-pointer-types-discards-qualifiers"
402+
const pixman_box32_t *rects = pixman_region32_rectangles(reg, &nrects);
403+
#pragma GCC diagnostic pop
398404
auto xrects = ccalloc(nrects, xcb_rectangle_t);
399405
for (int i = 0; i < nrects; i++) {
400406
xrects[i] =

0 commit comments

Comments
 (0)