From: Matthew Fernandez Date: Sat, 5 Mar 2022 18:38:44 +0000 (-0800) Subject: Xlib plugin: squash -Wsign-conversion warnings when setting 'normalhints' X-Git-Tag: 4.0.0~193^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=19b6a3f3a5bb3a9bf5c84ec3c9199c165f74c492;p=graphviz Xlib plugin: squash -Wsign-conversion warnings when setting 'normalhints' --- diff --git a/plugin/xlib/gvdevice_xlib.c b/plugin/xlib/gvdevice_xlib.c index 9126b5954..79fd89814 100644 --- a/plugin/xlib/gvdevice_xlib.c +++ b/plugin/xlib/gvdevice_xlib.c @@ -11,6 +11,7 @@ #include "config.h" #include +#include #include #include #include @@ -325,7 +326,9 @@ static void init_window(GVJ_t *job, Display *dpy, int scr) normalhints->flags = 0; normalhints->x = 0; normalhints->y = 0; + assert(job->width <= (unsigned)INT_MAX && "out of range width"); normalhints->width = job->width; + assert(job->height <= (unsigned)INT_MAX && "out of range height"); normalhints->height = job->height; classhint = XAllocClassHint();