mirror of
https://github.com/neovim/neovim.git
synced 2025-09-17 00:38:17 +00:00
MAKE: ask gnulikes to warn and be pedantic + fixes
It seems clang 3.4 thinks the codebase is in fantastic shape and gcc 4.9.0 has only minor niggles, which I fixed: - fix uninitialized member warning: In DEBUG mode the expr member doesn't get properly initialized to NULL. - fix warnings about directive inside of macro's: On some platforms/compilers, sprintf is a macro. Putting macro directives inside of a macro is unportable and gcc 4.9 warns about that. - fix signed vs. unsigned comparison warning: The in-memory table will luckily not even come close to the limits imposed by ssize_t. If it ever reaches that, we've got bigger problems.
This commit is contained in:

committed by
Thiago de Arruda

parent
6eece5895e
commit
3f29a02166
@@ -2225,12 +2225,14 @@ static void term_color(char_u *s, int n)
|
||||
&& (STRCMP(s + i + 1, "%p1%dm") == 0
|
||||
|| STRCMP(s + i + 1, "%dm") == 0)
|
||||
&& (s[i] == '3' || s[i] == '4')) {
|
||||
sprintf(buf,
|
||||
const char *fmt =
|
||||
#ifdef TERMINFO
|
||||
"%s%s%%p1%%dm",
|
||||
"%s%s%%p1%%dm";
|
||||
#else
|
||||
"%s%s%%dm",
|
||||
"%s%s%%dm";
|
||||
#endif
|
||||
sprintf(buf,
|
||||
fmt,
|
||||
i == 2 ? IF_EB("\033[", ESC_STR "[") : "\233",
|
||||
s[i] == '3' ? (n >= 16 ? "38;5;" : "9")
|
||||
: (n >= 16 ? "48;5;" : "10"));
|
||||
|
Reference in New Issue
Block a user