mirror of
https://github.com/neovim/neovim.git
synced 2025-10-01 15:38:33 +00:00
build: enable MSVC level 3 warnings (#21934)
MSVC has 4 different warning levels: 1 (severe), 2 (significant), 3 (production quality) and 4 (informational). Enabling level 3 warnings mostly revealed conversion problems, similar to GCC/clang -Wconversion flag.
This commit is contained in:
@@ -512,7 +512,7 @@ String nvim_cmd(uint64_t channel_id, Dict(cmd) *cmd, Dict(cmd_opts) *opts, Error
|
||||
} else if (cmd->count.type != kObjectTypeInteger || cmd->count.data.integer < 0) {
|
||||
VALIDATION_ERROR("'count' must be a non-negative Integer");
|
||||
}
|
||||
set_cmd_count(&ea, cmd->count.data.integer, true);
|
||||
set_cmd_count(&ea, (linenr_T)cmd->count.data.integer, true);
|
||||
}
|
||||
|
||||
if (HAS_KEY(cmd->reg)) {
|
||||
@@ -1005,7 +1005,7 @@ void create_user_command(String name, Object command, Dict(user_command) *opts,
|
||||
Error *err)
|
||||
{
|
||||
uint32_t argt = 0;
|
||||
long def = -1;
|
||||
int64_t def = -1;
|
||||
cmd_addr_T addr_type_arg = ADDR_NONE;
|
||||
int compl = EXPAND_NOTHING;
|
||||
char *compl_arg = NULL;
|
||||
|
@@ -181,7 +181,7 @@ void nvim_set_option_value(String name, Object value, Dict(option) *opts, Error
|
||||
|
||||
switch (value.type) {
|
||||
case kObjectTypeInteger:
|
||||
numval = value.data.integer;
|
||||
numval = (long)value.data.integer;
|
||||
break;
|
||||
case kObjectTypeBoolean:
|
||||
numval = value.data.boolean ? 1 : 0;
|
||||
|
Reference in New Issue
Block a user