From a8638d0344066f8001cce85c211034b4b31f1bb9 Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Wed, 30 Mar 2022 08:26:36 -0700 Subject: [PATCH] xlib plugin update_display: squash -Wsign-conversion warning for window depth --- plugin/xlib/gvdevice_xlib.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugin/xlib/gvdevice_xlib.c b/plugin/xlib/gvdevice_xlib.c index 0eb15118b..0098be6cd 100644 --- a/plugin/xlib/gvdevice_xlib.c +++ b/plugin/xlib/gvdevice_xlib.c @@ -253,8 +253,10 @@ static void update_display(GVJ_t *job, Display *dpy) if (job->has_grown) { XFreePixmap(dpy, window->pix); + assert(window->depth >= 0 && "Xlib returned invalid window depth"); window->pix = XCreatePixmap(dpy, window->win, - job->width, job->height, window->depth); + job->width, job->height, + (unsigned)window->depth); job->has_grown = false; job->needs_refresh = true; } -- 2.40.0