aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Reed <m.reed@mykolab.com>2015-01-23 19:42:21 -0500
committerMichael Reed <m.reed@mykolab.com>2015-01-23 19:42:21 -0500
commit1a40013bec9dff4493d667220687686f927d154e (patch)
tree5ef9c671e1aea33ce1e8af8dcfbad6e8fa3e882d
parenta6a75718a2f1dad9c9d9c548386e2f2d4ad731b5 (diff)
downloadrneovim-1a40013bec9dff4493d667220687686f927d154e.tar.gz
rneovim-1a40013bec9dff4493d667220687686f927d154e.tar.bz2
rneovim-1a40013bec9dff4493d667220687686f927d154e.zip
main.c: Enable -Wconversion
-rw-r--r--src/nvim/CMakeLists.txt1
-rw-r--r--src/nvim/main.c4
2 files changed, 3 insertions, 2 deletions
diff --git a/src/nvim/CMakeLists.txt b/src/nvim/CMakeLists.txt
index 4acc4b172d..d78bd5f711 100644
--- a/src/nvim/CMakeLists.txt
+++ b/src/nvim/CMakeLists.txt
@@ -62,7 +62,6 @@ set(CONV_SOURCES
if_cscope.c
indent.c
keymap.c
- main.c
mark.c
mbyte.c
memline.c
diff --git a/src/nvim/main.c b/src/nvim/main.c
index 0b0948373a..387b90395f 100644
--- a/src/nvim/main.c
+++ b/src/nvim/main.c
@@ -7,6 +7,7 @@
*/
#define EXTERN
+#include <assert.h>
#include <errno.h>
#include <inttypes.h>
#include <string.h>
@@ -293,7 +294,8 @@ int main(int argc, char **argv)
if (params.diff_mode)
diff_win_options(firstwin, FALSE);
- cmdline_row = Rows - p_ch;
+ assert(p_ch >= 0 && Rows >= p_ch && Rows - p_ch <= INT_MAX);
+ cmdline_row = (int)(Rows - p_ch);
msg_row = cmdline_row;
screenalloc(false); /* allocate screen buffers */
set_init_2();