From 3a055c146344094458bf6ebf30e6fd31eb77b62b Mon Sep 17 00:00:00 2001 From: "Emden R. Gansner" Date: Wed, 7 May 2014 11:31:28 -0400 Subject: [PATCH] Initialize value to remove warning; only shift graph label if set. --- lib/pack/pack.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/pack/pack.c b/lib/pack/pack.c index 3a71ff08b..229857b45 100644 --- a/lib/pack/pack.c +++ b/lib/pack/pack.c @@ -919,7 +919,7 @@ point *putGraphs(int ng, Agraph_t ** gs, Agraph_t * root, int i, v; boxf* bbs; Agraph_t* g; - point* pts; + point* pts = 0; char* s; if (ng <= 0) return NULL; @@ -1052,7 +1052,7 @@ static void shiftGraph(Agraph_t * g, int dx, int dy) bb.UR.y += dy; GD_bb(g) = bb; - if (GD_label(g)) + if (GD_label(g) && GD_label(g)->set) MOVEPT(GD_label(g)->pos); for (i = 1; i <= GD_n_cluster(g); i++) { -- 2.40.0