]> granicus.if.org Git - graphviz/commitdiff
common: squash -Wswitch-default warning in 'invflip_side'
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 21 May 2022 03:21:12 +0000 (20:21 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Mon, 23 May 2022 05:00:30 +0000 (22:00 -0700)
This switch is exhaustive, as `rankdir` is only intended to be one of the four
covered rank direction constants.

lib/common/shapes.c

index 23bcf2aca1d791ac39011f129fa0c69d3377b84d..ab2235773419cebbf09611f54fc40ddea09b0bcc 100644 (file)
@@ -8,6 +8,7 @@
  * Contributors: Details at https://graphviz.org
  *************************************************************************/
 
+#include <cgraph/unreachable.h>
 #include <common/render.h>
 #include <common/htmltable.h>
 #include <limits.h>
@@ -2433,6 +2434,8 @@ static int invflip_side(int side, int rankdir)
            break;
        }
        break;
+    default:
+       UNREACHABLE();
     }
     return side;
 }