diff options
| author | Justin M. Keyes <justinkz@gmail.com> | 2014-11-19 16:12:15 -0500 |
|---|---|---|
| committer | Justin M. Keyes <justinkz@gmail.com> | 2014-11-19 16:12:15 -0500 |
| commit | 32ec851270ff93d3453450cba54162841f519283 (patch) | |
| tree | e7fe7ee0b8d590ca442cd0bd6bd44ff2fc7f9e91 /src/nvim/cursor_shape.c | |
| parent | e8e3e6e798b789acc659b19f0c422c6444fc167c (diff) | |
| parent | 2b0d9bdeac987e8b25a69e762c8ae94092d87a34 (diff) | |
| download | rneovim-32ec851270ff93d3453450cba54162841f519283.tar.gz rneovim-32ec851270ff93d3453450cba54162841f519283.tar.bz2 rneovim-32ec851270ff93d3453450cba54162841f519283.zip | |
Merge pull request #1488 from fwalch/invert-wconversion
Invert -Wconversion handling & fix some warnings.
Diffstat (limited to 'src/nvim/cursor_shape.c')
| -rw-r--r-- | src/nvim/cursor_shape.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/nvim/cursor_shape.c b/src/nvim/cursor_shape.c index 328b751693..06c8186bf9 100644 --- a/src/nvim/cursor_shape.c +++ b/src/nvim/cursor_shape.c @@ -1,4 +1,5 @@ #include <assert.h> +#include <stdint.h> #include "nvim/vim.h" #include "nvim/ascii.h" #include "nvim/cursor_shape.h" @@ -52,7 +53,6 @@ char_u *parse_shape_opt(int what) int all_idx; int len; int i; - long n; int found_ve = FALSE; /* found "ve" flag */ int round; @@ -135,7 +135,9 @@ char_u *parse_shape_opt(int what) p += len; if (!VIM_ISDIGIT(*p)) return (char_u *)N_("E548: digit expected"); - n = getdigits(&p); + long digits = getdigits(&p); + assert(digits <= INT_MAX); + int n = (int)digits; if (len == 3) { /* "ver" or "hor" */ if (n == 0) return (char_u *)N_("E549: Illegal percentage"); |
