]> granicus.if.org Git - graphviz/commitdiff
smyrna renderSelectedNodes: fix no-op loop
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Fri, 10 Sep 2021 04:28:21 +0000 (21:28 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Thu, 16 Sep 2021 04:31:00 +0000 (21:31 -0700)
This condition was pretty clearly meant to guard the `continue`, not nothing. On
macOS, Clang dutifully warns:

  topviewfuncs.c:276:21: warning: if statement has empty body [-Wempty-body]

as noted by Stephen.¹

¹ https://forum.graphviz.org/t/tracking-down-warnings-old-news-to-some-of-you/821

cmd/smyrna/topviewfuncs.c

index 4c1ec7ab8f5cf264963e1a184d12658a3b7a5c26..2bbc649f67259a9c2c3436b63bcca3c18559443b 100644 (file)
@@ -275,7 +275,7 @@ static void renderSelectedNodes(Agraph_t * g)
 
     for (v = agfstnode(g); v; v = agnxtnode(g, v)) 
     {
-       if(!ND_selected(v));
+       if(!ND_selected(v))
            continue;
        x=parseXdotwithattrs(v);
        draw_xdot(x,-1);