1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

split_line: Define text_end only ifdef CONFIG_UTF8.

If CONFIG_UTF8 is not defined, then text_end is not used, and GCC
could warn about that.  Because configure can add -Werror to CFLAGS,
the warning could then cause the whole build to fail.
This commit is contained in:
Kalle Olavi Niemitalo 2006-12-03 22:23:42 +02:00 committed by Kalle Olavi Niemitalo
parent 640d73b7db
commit 3a7798d72b

View File

@ -45,7 +45,9 @@ split_line(unsigned char *text, int max_width, int *cells)
#endif /* CONFIG_UTF8 */
{
unsigned char *split = text;
#ifdef CONFIG_UTF8
unsigned char *text_end = split + strlen(split);
#endif /* CONFIG_UTF8 */
int cells_save = *cells;
if (max_width <= 0) return 0;