From: Matthew Fernandez Date: Sat, 5 Mar 2022 18:37:22 +0000 (-0800) Subject: Xlib plugin: squash -Wsign-conversion warnings for 'w' and 'h' X-Git-Tag: 4.0.0~193^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3e4f242ae604145900d3f69dd70f06bed04653d8;p=graphviz Xlib plugin: squash -Wsign-conversion warnings for 'w' and 'h' --- diff --git a/plugin/xlib/gvdevice_xlib.c b/plugin/xlib/gvdevice_xlib.c index 89a59441c..9126b5954 100644 --- a/plugin/xlib/gvdevice_xlib.c +++ b/plugin/xlib/gvdevice_xlib.c @@ -268,7 +268,6 @@ static void init_window(GVJ_t *job, Display *dpy, int scr) uint64_t attributemask = 0; char *name; window_t *window; - int w, h; double zoom_to_fit; window = malloc(sizeof(window_t)); @@ -277,8 +276,8 @@ static void init_window(GVJ_t *job, Display *dpy, int scr) return; } - w = 480; /* FIXME - w,h should be set by a --geometry commandline option */ - h = 325; + unsigned w = 480; /* FIXME - w,h should be set by a --geometry commandline option */ + unsigned h = 325; zoom_to_fit = MIN((double) w / (double) job->width, (double) h / (double) job->height);