From: Matthew Fernandez Date: Wed, 30 Mar 2022 15:26:36 +0000 (-0700) Subject: xlib plugin update_display: squash -Wsign-conversion warning for window depth X-Git-Tag: 4.0.0~141^2~11 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a8638d0344066f8001cce85c211034b4b31f1bb9;p=graphviz xlib plugin update_display: squash -Wsign-conversion warning for window depth --- 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; }