summaryrefslogtreecommitdiff
path: root/src/fe-text/textbuffer-view.c
diff options
context:
space:
mode:
authorDavid Leadbeater <dgl@dgl.cx>2014-07-06 18:56:17 +0100
committerDavid Leadbeater <dgl@dgl.cx>2014-07-06 18:56:17 +0100
commitbeec29c3054acc262ac2dbef5b29c1e279a6fdb3 (patch)
tree1041501b35529022daad89e25e1c30b14de93c85 /src/fe-text/textbuffer-view.c
parent1bf4753914b1ea71ebdc336f8986dd5040b8a398 (diff)
downloadirssi-beec29c3054acc262ac2dbef5b29c1e279a6fdb3.zip
Make configure checks able to build with -Werror
Also fix a few compiler warnings, this combined with pull #82 allows me to build with CFLAGS="-Werror -Wall".
Diffstat (limited to 'src/fe-text/textbuffer-view.c')
-rw-r--r--src/fe-text/textbuffer-view.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/fe-text/textbuffer-view.c b/src/fe-text/textbuffer-view.c
index 81deaf54..b240742c 100644
--- a/src/fe-text/textbuffer-view.c
+++ b/src/fe-text/textbuffer-view.c
@@ -22,6 +22,7 @@
#include "module.h"
#include "textbuffer-view.h"
+#include "signals.h"
#include "utf8.h"
typedef struct {
@@ -178,14 +179,14 @@ static void unformat_24bit_line_color(const unsigned char **ptr, int off, int *f
static inline unichar read_unichar(const unsigned char *data, const unsigned char **next, int *width)
{
- unichar chr = g_utf8_get_char_validated(data, -1);
+ unichar chr = g_utf8_get_char_validated((const char *) data, -1);
if (chr & 0x80000000) {
chr = 0xfffd;
*next = data + 1;
*width = 1;
} else {
- *next = g_utf8_next_char(data);
+ *next = (unsigned char *)g_utf8_next_char(data);
*width = unichar_isprint(chr) ? mk_wcwidth(chr) : 1;
}
return chr;