aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/cursor_shape.c
diff options
context:
space:
mode:
authorFlorian Walch <florian@fwalch.com>2014-11-18 14:08:08 +0100
committerFlorian Walch <florian@fwalch.com>2014-11-19 17:21:21 +0100
commitd2338ce397c3a8eb83875c589e952280c1bd57bc (patch)
treeaea422248ff6b0dd75b6de8c8b419e8fc869c74f /src/nvim/cursor_shape.c
parent96b31ca04814193197f6ec16049bd0cfc02929c9 (diff)
downloadrneovim-d2338ce397c3a8eb83875c589e952280c1bd57bc.tar.gz
rneovim-d2338ce397c3a8eb83875c589e952280c1bd57bc.tar.bz2
rneovim-d2338ce397c3a8eb83875c589e952280c1bd57bc.zip
Wconversion: Fix warnings in cursor_shape.c.
Diffstat (limited to 'src/nvim/cursor_shape.c')
-rw-r--r--src/nvim/cursor_shape.c6
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");