From: Matthew Fernandez Date: Thu, 8 Sep 2022 00:27:49 +0000 (-0700) Subject: smyrna EmbedText: squash some compiler warnings X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=90f2a1100f2ddbcf9ca86d0a960ffa4b8cbde5cc;p=graphviz smyrna EmbedText: squash some compiler warnings This switch is exhaustive. This change squashes the following warnings: draw.c:341:9: warning: switch missing default case [-Wswitch-default] 341 | switch (o->op.u.text.align) | ^~~~~~ draw.c:374:9: warning: ‘x’ may be used uninitialized in this function [-Wmaybe-uninitialized] 374 | glCompDrawText3D(o->font,x,y,view->Topview->global_z… | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~… --- diff --git a/cmd/smyrna/draw.c b/cmd/smyrna/draw.c index 26463e9ef..267a1aa59 100644 --- a/cmd/smyrna/draw.c +++ b/cmd/smyrna/draw.c @@ -14,6 +14,7 @@ XDOT DRAWING FUNCTIONS, maybe need to move them somewhere else for now keep them at the bottom */ #include "draw.h" +#include #include #include #include @@ -349,7 +350,8 @@ static void EmbedText(sdot_op* o, int param) case xd_right: x=o->op.u.text.x - o->op.u.text.width; break; - + default: + UNREACHABLE(); } y=o->op.u.text.y; if (!o->font)