From: Matthew Fernandez Date: Wed, 7 Sep 2022 04:53:40 +0000 (-0700) Subject: smyrna: use an 'unsigned' for 'topviewcache.edgelabel_id' X-Git-Tag: 6.0.1~4^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=66223e81bf66c9b3df7a34b1e98918841604f937;p=graphviz smyrna: use an 'unsigned' for 'topviewcache.edgelabel_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 775d632fa..759be3304 100644 --- a/cmd/smyrna/smyrnadefs.h +++ b/cmd/smyrna/smyrnadefs.h @@ -145,7 +145,7 @@ typedef struct unsigned selnode_id; unsigned seledge_id; unsigned nodelabel_id; - int edgelabel_id; + unsigned edgelabel_id; }topviewcache; typedef struct { diff --git a/cmd/smyrna/topviewfuncs.c b/cmd/smyrna/topviewfuncs.c index ce8e862c0..56fb9a931 100644 --- a/cmd/smyrna/topviewfuncs.c +++ b/cmd/smyrna/topviewfuncs.c @@ -798,7 +798,7 @@ static void cacheNodeLabels(Agraph_t * g,topview* t) } static void cacheEdgeLabels(Agraph_t * g,topview* t) { - if(t->cache.edgelabel_id!=-1) /*clean existing cache*/ + if (t->cache.edgelabel_id != UINT_MAX) // clean existing cache glDeleteLists(t->cache.edgelabel_id,1); t->cache.edgelabel_id=glGenLists(1); glNewList(t->cache.edgelabel_id,GL_COMPILE);