From 3a7798d72b22b184a57607a68b6483b6e88bb6ea Mon Sep 17 00:00:00 2001 From: Kalle Olavi Niemitalo Date: Sun, 3 Dec 2006 22:23:42 +0200 Subject: [PATCH] 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. --- src/bfu/text.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/bfu/text.c b/src/bfu/text.c index a205f256c..2fa4c1d23 100644 --- a/src/bfu/text.c +++ b/src/bfu/text.c @@ -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;