Skip to content

Commit

Permalink
x: fix CI build failure
Browse files Browse the repository at this point in the history
Signed-off-by: Yuxuan Shui <[email protected]>
  • Loading branch information
yshui committed Dec 14, 2022
1 parent 3b342af commit 61d9ed3
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/x.c
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,13 @@ uint32_t x_create_region(xcb_connection_t *c, const region_t *reg) {
}

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

0 comments on commit 61d9ed3

Please sign in to comment.