From 90f2a1100f2ddbcf9ca86d0a960ffa4b8cbde5cc Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Wed, 7 Sep 2022 17:27:49 -0700 Subject: [PATCH] smyrna EmbedText: squash some compiler warnings MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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… | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~… --- cmd/smyrna/draw.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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) -- 2.40.0