mirror of
https://github.com/neovim/neovim.git
synced 2025-09-17 00:38:17 +00:00
Wconversion: Fix warnings in cursor_shape.c.
This commit is contained in:
@@ -42,7 +42,6 @@ list(REMOVE_ITEM NEOVIM_SOURCES ${to_remove})
|
|||||||
set(CONV_SOURCES
|
set(CONV_SOURCES
|
||||||
buffer.c
|
buffer.c
|
||||||
charset.c
|
charset.c
|
||||||
cursor_shape.c
|
|
||||||
diff.c
|
diff.c
|
||||||
digraph.c
|
digraph.c
|
||||||
edit.c
|
edit.c
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
#include <stdint.h>
|
||||||
#include "nvim/vim.h"
|
#include "nvim/vim.h"
|
||||||
#include "nvim/ascii.h"
|
#include "nvim/ascii.h"
|
||||||
#include "nvim/cursor_shape.h"
|
#include "nvim/cursor_shape.h"
|
||||||
@@ -52,7 +53,6 @@ char_u *parse_shape_opt(int what)
|
|||||||
int all_idx;
|
int all_idx;
|
||||||
int len;
|
int len;
|
||||||
int i;
|
int i;
|
||||||
long n;
|
|
||||||
int found_ve = FALSE; /* found "ve" flag */
|
int found_ve = FALSE; /* found "ve" flag */
|
||||||
int round;
|
int round;
|
||||||
|
|
||||||
@@ -135,7 +135,9 @@ char_u *parse_shape_opt(int what)
|
|||||||
p += len;
|
p += len;
|
||||||
if (!VIM_ISDIGIT(*p))
|
if (!VIM_ISDIGIT(*p))
|
||||||
return (char_u *)N_("E548: digit expected");
|
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 (len == 3) { /* "ver" or "hor" */
|
||||||
if (n == 0)
|
if (n == 0)
|
||||||
return (char_u *)N_("E549: Illegal percentage");
|
return (char_u *)N_("E549: Illegal percentage");
|
||||||
|
Reference in New Issue
Block a user