]> granicus.if.org Git - graphviz/commitdiff
Remove 2 -Wunused-but-set-variable warnings in graph_generator.c
authorMagnus Jacobsson <Magnus.Jacobsson@berotec.se>
Sat, 7 Nov 2020 14:19:23 +0000 (15:19 +0100)
committerMagnus Jacobsson <Magnus.Jacobsson@berotec.se>
Sat, 21 Nov 2020 08:17:09 +0000 (09:17 +0100)
cmd/tools/graph_generator.c

index faf11992d5f73e65b32545fb3dc46ca0033bdef0..8c12b7fe2f13c8ef66485c7f542a8036784b3812 100644 (file)
@@ -298,14 +298,11 @@ void makeSierpinski(int depth, edgefn ef)
     vtx_data* graph;
     int* edges;
     int n;
-    int nedges;
     int i, j;
 
     depth--;
     n = 3 * (1 + ((int) (pow(3.0, (double) depth) + 0.5) - 1) / 2);
 
-    nedges = (int) (pow(3.0, depth + 1.0) + 0.5);
-
     graph = N_NEW(n + 1, vtx_data);
     edges = N_NEW(4 * n, int);
 
@@ -385,14 +382,11 @@ void makeTetrix(int depth, edgefn ef)
     vtx_data* graph;
     int* edges;
     int n;
-    int nedges;
     int i, j;
 
     depth--;
     n = 4 + 2 * (((int) (pow(4.0, (double) depth) + 0.5) - 1));
 
-    nedges = 6 * (int) (pow(4.0, depth) + 0.5);
-
     graph = N_NEW(n + 1, vtx_data);
     edges = N_NEW(6 * n, int);