vi.c: remove warning: variable 'sp' set but not used

Signed-off-by: Cristian Ionescu-Idbohrn <cii@axis.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Cristian Ionescu-Idbohrn 2011-05-16 03:53:43 +02:00 committed by Denys Vlasenko
parent 662972a77a
commit 9a296fbeab

View File

@ -1688,12 +1688,16 @@ static char *char_insert(char *p, char c) // insert the char c at 'p'
p = text_hole_delete(p, p); // shrink buffer 1 char p = text_hole_delete(p, p); // shrink buffer 1 char
} }
} else { } else {
#if ENABLE_FEATURE_VI_SETOPTS
// insert a char into text[] // insert a char into text[]
char *sp; // "save p" char *sp; // "save p"
#endif
if (c == 13) if (c == 13)
c = '\n'; // translate \r to \n c = '\n'; // translate \r to \n
#if ENABLE_FEATURE_VI_SETOPTS
sp = p; // remember addr of insert sp = p; // remember addr of insert
#endif
p += 1 + stupid_insert(p, c); // insert the char p += 1 + stupid_insert(p, c); // insert the char
#if ENABLE_FEATURE_VI_SETOPTS #if ENABLE_FEATURE_VI_SETOPTS
if (showmatch && strchr(")]}", *sp) != NULL) { if (showmatch && strchr(")]}", *sp) != NULL) {