From: Matthew Fernandez Date: Sun, 20 Jun 2021 18:59:51 +0000 (-0700) Subject: remove some variable shadowing in node_distinct_coloring_internal2 X-Git-Tag: 2.48.0~28^2~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b0749144aee0413713e272f6d8e58fcfabacb99f;p=graphviz remove some variable shadowing in node_distinct_coloring_internal2 Squashes two -Wshadow warnings. --- diff --git a/lib/edgepaint/node_distinct_coloring.c b/lib/edgepaint/node_distinct_coloring.c index 14a8d896e..8e61c4dea 100644 --- a/lib/edgepaint/node_distinct_coloring.c +++ b/lib/edgepaint/node_distinct_coloring.c @@ -43,8 +43,6 @@ static void node_distinct_coloring_internal2(int scheme, QuadTree qt, int weight real cspace_size = 0.7; real red[3], black[3], min; int flag = 0, imin; - color_lab lab; - color_rgb rgb; real *wgt = NULL; //int iter2 = 0, iter_max2; @@ -52,9 +50,11 @@ static void node_distinct_coloring_internal2(int scheme, QuadTree qt, int weight max_level = MAX(1, -log(accuracy)/log(2.)); max_level = MIN(30, max_level); - rgb.r = 255*0.5; rgb.g = 0; rgb.b = 0; - lab = RGB2LAB(rgb); - red[0] = lab.l; red[1] = lab.a; red[2] = lab.b; + { + color_rgb rgb = { .r = 255*0.5, .g = 0, .b = 0 }; + color_lab lab = RGB2LAB(rgb); + red[0] = lab.l; red[1] = lab.a; red[2] = lab.b; + } n = A->m; if (n == 1){