]> granicus.if.org Git - graphviz/commitdiff
makeObstacle: squash a spurious -Wswitch-default compiler warning
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Mon, 6 Sep 2021 19:56:58 +0000 (12:56 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Thu, 9 Sep 2021 14:32:12 +0000 (07:32 -0700)
The surrounding context ensures that the cases in this switch cover every
possibility.

lib/neatogen/neatosplines.c

index 2ac72a63c628a11b0d5a018a6fe7ea62e4feeeca..b4fe04ea43c940c31e46995b90f4b49a08b4749b 100644 (file)
@@ -11,6 +11,7 @@
 
 #include "config.h"
 
+#include <cgraph/unreachable.h>
 #include <neatogen/neato.h>
 #include <neatogen/adjust.h>
 #include <pathplan/pathplan.h>
@@ -359,6 +360,8 @@ Ppoly_t *makeObstacle(node_t * n, expand_t* pmargin, boolean isOrtho)
                            xmargin = margin.x;
                            ymargin = -margin.y;
                            break;
+                       default:
+                           UNREACHABLE();
                        }
                        polyp.x = verts[j].x + xmargin;
                        polyp.y = verts[j].y + ymargin;