aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/message.c
diff options
context:
space:
mode:
authorEliseo Martínez <eliseomarmol@gmail.com>2014-11-10 18:00:46 +0100
committerEliseo Martínez <eliseomarmol@gmail.com>2014-11-11 01:43:14 +0100
commita6548e4fb34d50fbd49d0878618c3aecefabe79b (patch)
tree68ecc9a6718caf0cdb1bca365ce6373944af1357 /src/nvim/message.c
parent5bf6639e0fb5698a436efe5105fa5dc8714f67dc (diff)
downloadrneovim-a6548e4fb34d50fbd49d0878618c3aecefabe79b.tar.gz
rneovim-a6548e4fb34d50fbd49d0878618c3aecefabe79b.tar.bz2
rneovim-a6548e4fb34d50fbd49d0878618c3aecefabe79b.zip
Fix warnings: message.c: vim_vsnprintf(): Dead assignment (2): HI.
Problem : Dead assignment @ 3323. Dead assignment @ 3587. Diagnostic : Harmless issues. Rationale : - 3323: Assignment is in fact dead. But, in addition to that, `length_modifier` is assigned default value `\0` when declared and is untouched in path leading to signaled point. So, maintaining assignment adds nothing to code. - 3587: Assignment is in fact dead. It could be thought that `precision_specified` has to be 1 in order to flag `precision` as having a valid value. But that doesn't seem to be the case, as there are places in the code where `precision` gets assigned a default value, even if `precision_specified` is 0. So, maintaining assignment adds nothing to code. Resolution : Remove dead assignments.
Diffstat (limited to 'src/nvim/message.c')
-rw-r--r--src/nvim/message.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/src/nvim/message.c b/src/nvim/message.c
index 0e287268eb..ee83fd371e 100644
--- a/src/nvim/message.c
+++ b/src/nvim/message.c
@@ -3323,7 +3323,6 @@ int vim_vsnprintf(char *str, size_t str_m, char *fmt, va_list ap, typval_T *tvs)
case 'c':
case 's':
case 'S':
- length_modifier = '\0';
str_arg_l = 1;
switch (fmt_spec) {
case '%':
@@ -3587,7 +3586,6 @@ int vim_vsnprintf(char *str, size_t str_m, char *fmt, va_list ap, typval_T *tvs)
* zero value is formatted with an
* explicit precision of zero */
precision = num_of_digits + 1;
- precision_specified = 1;
}
}
/* zero padding to specified precision? */