From: Matthew Fernandez Date: Wed, 7 Sep 2022 04:49:51 +0000 (-0700) Subject: smyrna: use an 'unsigned' for 'topviewcache.nodelabel_id' X-Git-Tag: 6.0.1~4^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=272533c747a17f4694a50da3a7d4b07073a3ef44;p=graphviz smyrna: use an 'unsigned' for 'topviewcache.nodelabel_id' Squashes 4 -Wsign-conversion warnings. Note that this also changes the sentinel from `-1` to `UINT_MAX`. --- diff --git a/cmd/smyrna/smyrnadefs.h b/cmd/smyrna/smyrnadefs.h index fe8595ffd..775d632fa 100644 --- a/cmd/smyrna/smyrnadefs.h +++ b/cmd/smyrna/smyrnadefs.h @@ -144,7 +144,7 @@ typedef struct unsigned edge_id; unsigned selnode_id; unsigned seledge_id; - int nodelabel_id; + unsigned nodelabel_id; int edgelabel_id; }topviewcache; diff --git a/cmd/smyrna/topviewfuncs.c b/cmd/smyrna/topviewfuncs.c index 90c999a0c..ce8e862c0 100644 --- a/cmd/smyrna/topviewfuncs.c +++ b/cmd/smyrna/topviewfuncs.c @@ -789,7 +789,7 @@ void cacheSelectedNodes(Agraph_t * g,topview* t) } static void cacheNodeLabels(Agraph_t * g,topview* t) { - if(t->cache.nodelabel_id!=-1) /*clean existing cache*/ + if (t->cache.nodelabel_id != UINT_MAX) // clean existing cache glDeleteLists(t->cache.nodelabel_id,1); t->cache.nodelabel_id=glGenLists(1); glNewList(t->cache.nodelabel_id,GL_COMPILE);