]> granicus.if.org Git - graphviz/commitdiff
xlib plugin init_window: squash -Wsign-conversion warning for window depth
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Wed, 30 Mar 2022 15:30:24 +0000 (08:30 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 2 Apr 2022 19:55:48 +0000 (12:55 -0700)
plugin/xlib/gvdevice_xlib.c

index 52c9adca614d4b9f4ec5da3dfc6aff828d65604f..501d01946a35737d60e26c377df8093b3c757e79 100644 (file)
@@ -365,8 +365,9 @@ static void init_window(GVJ_t *job, Display *dpy, int scr)
     XFree(normalhints);
     free(name);
 
+    assert(window->depth >= 0 && "Xlib returned invalid window depth");
     window->pix = XCreatePixmap(dpy, window->win, job->width, job->height,
-               window->depth);
+                                (unsigned)window->depth);
     if (argb)
         gcv.foreground = 0;
     else