diff options
author | Florian Walch <florian@fwalch.com> | 2014-11-18 20:20:25 +0100 |
---|---|---|
committer | Florian Walch <florian@fwalch.com> | 2014-11-27 21:06:27 +0100 |
commit | cfe4cada301ea30af75fe09f8da8039eca7336d3 (patch) | |
tree | 6e5f60ab6271d07cb9092cf899cf2369e3dca090 | |
parent | 98b11f5db3a99ef633ad77ddc6b22dc428873e95 (diff) | |
download | rneovim-cfe4cada301ea30af75fe09f8da8039eca7336d3.tar.gz rneovim-cfe4cada301ea30af75fe09f8da8039eca7336d3.tar.bz2 rneovim-cfe4cada301ea30af75fe09f8da8039eca7336d3.zip |
Wconversion: Fix warnings in ex_eval.c.
-rw-r--r-- | src/nvim/CMakeLists.txt | 1 | ||||
-rw-r--r-- | src/nvim/ex_eval.c | 6 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/nvim/CMakeLists.txt b/src/nvim/CMakeLists.txt index a2d052c4ec..3307d1bf94 100644 --- a/src/nvim/CMakeLists.txt +++ b/src/nvim/CMakeLists.txt @@ -48,7 +48,6 @@ set(CONV_SOURCES ex_cmds2.c ex_cmds.c ex_docmd.c - ex_eval.c ex_getln.c farsi.c fileio.c diff --git a/src/nvim/ex_eval.c b/src/nvim/ex_eval.c index fba0b93253..ef3facb18b 100644 --- a/src/nvim/ex_eval.c +++ b/src/nvim/ex_eval.c @@ -11,6 +11,7 @@ */ #include <assert.h> #include <stdbool.h> +#include <stdint.h> #include <inttypes.h> #include "nvim/vim.h" @@ -1307,7 +1308,7 @@ void ex_catch(exarg_T *eap) int skip = FALSE; int caught = FALSE; char_u *end; - int save_char = 0; + char_u save_char = 0; char_u *save_cpo; regmatch_T regmatch; int prev_got_int; @@ -1530,7 +1531,8 @@ void ex_finally(exarg_T *eap) pending |= did_throw ? CSTP_THROW : 0; pending |= did_emsg ? CSTP_ERROR : 0; pending |= got_int ? CSTP_INTERRUPT : 0; - cstack->cs_pending[cstack->cs_idx] = pending; + assert(pending >= CHAR_MIN && pending <= CHAR_MAX); + cstack->cs_pending[cstack->cs_idx] = (char)pending; /* It's mandatory that the current exception is stored in the * cstack so that it can be rethrown at the ":endtry" or be |