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:
parent
640d73b7db
commit
3a7798d72b
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user