diff options
author | John Szakmeister <john@szakmeister.net> | 2017-03-18 06:54:08 -0400 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2017-03-18 03:45:54 +0100 |
commit | c6b3975774b21461873c6be9da3b9b0bcef4017a (patch) | |
tree | cec650acf751d15ae8e40d3c68e14b739c9a5b47 /src | |
parent | 9abef7ded95995e3546b8d273ab4ad996ce3ed50 (diff) | |
download | rneovim-c6b3975774b21461873c6be9da3b9b0bcef4017a.tar.gz rneovim-c6b3975774b21461873c6be9da3b9b0bcef4017a.tar.bz2 rneovim-c6b3975774b21461873c6be9da3b9b0bcef4017a.zip |
vim_vsnprintf: fix conversion error #6311
This looks mostly like a case where the compiler that ships with Ubuntu
12.04 has gone a little too far: `fmt_spec` is actually a char, as are
the literals, so there's really no issue.
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/strings.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/strings.c b/src/nvim/strings.c index 7768636ded..d03970108b 100644 --- a/src/nvim/strings.c +++ b/src/nvim/strings.c @@ -1228,7 +1228,7 @@ int vim_vsnprintf(char *str, size_t str_m, const char *fmt, va_list ap, l += snprintf(format + 1, sizeof(format) - 1, ".%d", (int)precision); } - format[l] = fmt_spec == 'F' ? 'f' : fmt_spec; + format[l] = (char)(fmt_spec == 'F' ? 'f' : fmt_spec); format[l + 1] = NUL; assert(l + 1 < (int)sizeof(format)); str_arg_l = (size_t)snprintf(tmp, sizeof(tmp), format, f); |