diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2014-11-27 21:02:30 -0500 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2014-11-27 21:02:30 -0500 |
commit | 68cee4c28d6c309e18ae35eeba9d5dffaf1078ca (patch) | |
tree | 3f129ff50c55b72fb182b45df4c44212a837171c /src/nvim/ex_eval.c | |
parent | 5e4809f5a4ba4d3cc6a6cdea5f7ac632c73086ab (diff) | |
parent | ce5d6506ba0d8241dbee94aceb56ea53a6bd1ed9 (diff) | |
download | rneovim-68cee4c28d6c309e18ae35eeba9d5dffaf1078ca.tar.gz rneovim-68cee4c28d6c309e18ae35eeba9d5dffaf1078ca.tar.bz2 rneovim-68cee4c28d6c309e18ae35eeba9d5dffaf1078ca.zip |
Merge pull request #1492 from fwalch/fix-wconversion
Fix some more -Wconversion warnings.
Diffstat (limited to 'src/nvim/ex_eval.c')
-rw-r--r-- | src/nvim/ex_eval.c | 6 |
1 files changed, 4 insertions, 2 deletions
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 |