From a746d9b26f36f67aadb4699e48d4bd5c843b335a Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Wed, 17 Aug 2022 19:03:42 -0700 Subject: [PATCH] common pos_reclbl: treat 'sides' uniformly as an unsigned char Squashes a -Wconversion warning. --- lib/common/shapes.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/common/shapes.c b/lib/common/shapes.c index 3854e3ca8..4cc117b77 100644 --- a/lib/common/shapes.c +++ b/lib/common/shapes.c @@ -3437,9 +3437,9 @@ static void resize_reclbl(field_t * f, pointf sz, int nojustify_p) * the sides attribute, which indicates which sides of the * record are accessible to the field. */ -static void pos_reclbl(field_t * f, pointf ul, int sides) -{ - int i, last, mask; +static void pos_reclbl(field_t *f, pointf ul, unsigned char sides) { + int i, last; + unsigned char mask; f->sides = sides; f->b.LL = pointfof(ul.x, ul.y - f->size.y); @@ -3470,7 +3470,7 @@ static void pos_reclbl(field_t * f, pointf ul, int sides) } } else mask = 0; - pos_reclbl(f->fld[i], ul, sides & mask); + pos_reclbl(f->fld[i], ul, (unsigned char)(sides & mask)); if (f->LR) ul.x = ul.x + f->fld[i]->size.x; else @@ -3518,7 +3518,7 @@ static void record_init(node_t * n) int flip; size_t len; char *textbuf; /* temp buffer for storing labels */ - int sides = BOTTOM | RIGHT | TOP | LEFT; + unsigned char sides = BOTTOM | RIGHT | TOP | LEFT; /* Always use rankdir to determine how records are laid out */ flip = !GD_realflip(agraphof(n)); -- 2.50.1