aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Szakmeister <jszakmeister@users.noreply.github.com>2018-04-12 06:50:01 -0400
committerJustin M. Keyes <justinkz@gmail.com>2018-04-12 12:50:01 +0200
commitd48df146d1644028128046946b76f92eef23dc50 (patch)
tree33b6923fb4bf7c2c5c3bbaa657fe294eec487476
parent87f4d2592c2ba164683b1f0f813cf9f029a0abfb (diff)
downloadrneovim-d48df146d1644028128046946b76f92eef23dc50.tar.gz
rneovim-d48df146d1644028128046946b76f92eef23dc50.tar.bz2
rneovim-d48df146d1644028128046946b76f92eef23dc50.zip
tui: fix uninitialize variable usage (#8261)
This fixes an issue with compiles failing in release mode due to shape having the possibility of being used uninitialized (since the default case was missing).
-rw-r--r--src/nvim/tui/tui.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/nvim/tui/tui.c b/src/nvim/tui/tui.c
index a7d4d49e0c..b694fe1194 100644
--- a/src/nvim/tui/tui.c
+++ b/src/nvim/tui/tui.c
@@ -937,6 +937,7 @@ static void tui_set_mode(UI *ui, ModeShape mode)
int shape;
switch (c.shape) {
+ default:
case SHAPE_BLOCK: shape = 1; break;
case SHAPE_HOR: shape = 3; break;
case SHAPE_VER: shape = 5; break;