diff options
author | David Leadbeater <dgl@dgl.cx> | 2014-07-06 18:56:17 +0100 |
---|---|---|
committer | David Leadbeater <dgl@dgl.cx> | 2014-07-06 18:56:17 +0100 |
commit | beec29c3054acc262ac2dbef5b29c1e279a6fdb3 (patch) | |
tree | 1041501b35529022daad89e25e1c30b14de93c85 /src | |
parent | 1bf4753914b1ea71ebdc336f8986dd5040b8a398 (diff) | |
download | irssi-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')
-rw-r--r-- | src/core/network.c | 2 | ||||
-rw-r--r-- | src/fe-text/gui-entry.c | 2 | ||||
-rw-r--r-- | src/fe-text/term-terminfo.c | 4 | ||||
-rw-r--r-- | src/fe-text/textbuffer-view.c | 5 | ||||
-rw-r--r-- | src/perl/textui/Statusbar.xs | 3 |
5 files changed, 8 insertions, 8 deletions
diff --git a/src/core/network.c b/src/core/network.c index 7e55d472..de5abbbe 100644 --- a/src/core/network.c +++ b/src/core/network.c @@ -60,7 +60,7 @@ GIOChannel *g_io_channel_new(int handle) IPADDR ip4_any = { AF_INET, - { { { INADDR_ANY } } } + { INADDR_ANY } }; int net_ip_compare(IPADDR *ip1, IPADDR *ip2) diff --git a/src/fe-text/gui-entry.c b/src/fe-text/gui-entry.c index 13cbfafd..f123ce4c 100644 --- a/src/fe-text/gui-entry.c +++ b/src/fe-text/gui-entry.c @@ -452,7 +452,7 @@ void gui_entry_insert_text(GUI_ENTRY_REC *entry, const char *str) g_utf8_validate(str, -1, &ptr); len = g_utf8_pointer_to_offset(str, ptr); } else if (term_type == TERM_TYPE_BIG5) - len = strlen_big5(str); + len = strlen_big5((const unsigned char *)str); else len = strlen(str); entry_text_grow(entry, len); diff --git a/src/fe-text/term-terminfo.c b/src/fe-text/term-terminfo.c index 2ca2f347..6459ce75 100644 --- a/src/fe-text/term-terminfo.c +++ b/src/fe-text/term-terminfo.c @@ -140,7 +140,7 @@ int term_init(void) term_set_input_type(TERM_TYPE_8BIT); term_common_init(); - g_atexit(term_deinit); + atexit(term_deinit); return TRUE; } @@ -568,7 +568,7 @@ void term_stop(void) static int input_utf8(const unsigned char *buffer, int size, unichar *result) { - unichar c = g_utf8_get_char_validated(buffer, size); + unichar c = g_utf8_get_char_validated((char *)buffer, size); switch (c) { case (unichar)-1: 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; diff --git a/src/perl/textui/Statusbar.xs b/src/perl/textui/Statusbar.xs index d904ae9f..620fad9a 100644 --- a/src/perl/textui/Statusbar.xs +++ b/src/perl/textui/Statusbar.xs @@ -50,7 +50,6 @@ static void perl_statusbar_event(char *function, SBAR_ITEM_REC *item, int get_size_only) { dSP; - int retcount; SV *item_sv, **sv; HV *hv; @@ -63,7 +62,7 @@ static void perl_statusbar_event(char *function, SBAR_ITEM_REC *item, XPUSHs(sv_2mortal(newSViv(get_size_only))); PUTBACK; - retcount = perl_call_pv(function, G_EVAL|G_DISCARD); + perl_call_pv(function, G_EVAL|G_DISCARD); SPAGAIN; if (SvTRUE(ERRSV)) { |