From: Matthew Fernandez Date: Wed, 10 Aug 2022 00:44:27 +0000 (-0700) Subject: xdot parseXDotFOn: squash -Wsign-compare warning X-Git-Tag: 5.0.1~14^2~5 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=074fca117009def33f77bf1a998372febcdb3907;p=graphviz xdot parseXDotFOn: squash -Wsign-compare warning --- diff --git a/lib/xdot/xdot.c b/lib/xdot/xdot.c index 865386df7..86058332d 100644 --- a/lib/xdot/xdot.c +++ b/lib/xdot/xdot.c @@ -341,7 +341,7 @@ xdot *parseXDotFOn (char *s, drawfunc_t fns[], int sz, xdot* x) if (!x) { x = gv_alloc(sizeof(*x)); - if (sz <= sizeof(xdot_op)) + if (sz < 0 || (size_t)sz <= sizeof(xdot_op)) sz = sizeof(xdot_op); /* cnt, freefunc, ops, flags zeroed by gv_alloc */