diff options
author | Timo Sirainen <cras@irssi.org> | 2000-11-18 15:31:28 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2000-11-18 15:31:28 +0000 |
commit | 14e5dc8b8e477baa000ba4b5073027eb629b416d (patch) | |
tree | 468d75acb00d8dada6e1e9dbf4c836320ed12c2e | |
parent | c4af878047776d3a01abdd70afeaee71930d87a9 (diff) | |
download | irssi-14e5dc8b8e477baa000ba4b5073027eb629b416d.zip |
compiler warning fixes + one real bug in dcc-chat
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@850 dbcabf3a-b0e7-0310-adc4-f8d773084564
-rw-r--r-- | src/core/levels.c | 2 | ||||
-rw-r--r-- | src/fe-common/core/chat-completion.c | 2 | ||||
-rw-r--r-- | src/fe-common/core/completion.c | 2 | ||||
-rw-r--r-- | src/fe-common/core/formats.c | 6 | ||||
-rw-r--r-- | src/irc/dcc/dcc-chat.c | 2 |
5 files changed, 7 insertions, 7 deletions
diff --git a/src/core/levels.c b/src/core/levels.c index 1c526b1a..d6f3f1ef 100644 --- a/src/core/levels.c +++ b/src/core/levels.c @@ -66,7 +66,7 @@ int level_get(const char *level) match = 0; for (n = 0; levels[n] != NULL; n++) { if (strncmp(levels[n], level, len) == 0) { - if (strlen(levels[n]) == len) { + if ((int)strlen(levels[n]) == len) { /* full match */ return 1L << n; } diff --git a/src/fe-common/core/chat-completion.c b/src/fe-common/core/chat-completion.c index dff1f90b..b04d2dfb 100644 --- a/src/fe-common/core/chat-completion.c +++ b/src/fe-common/core/chat-completion.c @@ -130,7 +130,7 @@ static int nick_completion_timeout(void) last_msgs_remove_old(&channel->lastmsgs, keep_msgs_time, now); if (keep_msgs_count == 0 || - g_slist_length(channel->lastownmsgs) > keep_msgs_count) { + (int)g_slist_length(channel->lastownmsgs) > keep_msgs_count) { last_msgs_remove_old(&channel->lastownmsgs, keep_ownmsgs_time, now); } diff --git a/src/fe-common/core/completion.c b/src/fe-common/core/completion.c index 1e4e49db..a61d63b7 100644 --- a/src/fe-common/core/completion.c +++ b/src/fe-common/core/completion.c @@ -361,7 +361,7 @@ static GList *completion_get_subcommands(const char *cmd) for (tmp = commands; tmp != NULL; tmp = tmp->next) { COMMAND_REC *rec = tmp->data; - if (strlen(rec->cmd) < len) + if ((int)strlen(rec->cmd) < len) continue; if (strchr(rec->cmd+len, ' ') != NULL) diff --git a/src/fe-common/core/formats.c b/src/fe-common/core/formats.c index e6cedd1b..205ffec1 100644 --- a/src/fe-common/core/formats.c +++ b/src/fe-common/core/formats.c @@ -87,7 +87,7 @@ int format_expand_styles(GString *out, char format, TEXT_DEST_REC *dest) if (p != NULL) { g_string_append_c(out, 4); g_string_append_c(out, FORMAT_COLOR_NOCHANGE); - g_string_append_c(out, (int) (p-backs)+'0'); + g_string_append_c(out, (char) ((int) (p-backs)+'0')); break; } @@ -96,7 +96,7 @@ int format_expand_styles(GString *out, char format, TEXT_DEST_REC *dest) p = strchr(fores, format); if (p != NULL) { g_string_append_c(out, 4); - g_string_append_c(out, (int) (p-fores)+'0'); + g_string_append_c(out, (char) ((int) (p-fores)+'0')); g_string_append_c(out, FORMAT_COLOR_NOCHANGE); break; } @@ -106,7 +106,7 @@ int format_expand_styles(GString *out, char format, TEXT_DEST_REC *dest) p = strchr(boldfores, format); if (p != NULL) { g_string_append_c(out, 4); - g_string_append_c(out, 8+(int) (p-boldfores)+'0'); + g_string_append_c(out, (char) (8+(int) (p-boldfores)+'0')); g_string_append_c(out, FORMAT_COLOR_NOCHANGE); break; } diff --git a/src/irc/dcc/dcc-chat.c b/src/irc/dcc/dcc-chat.c index 59b4a776..7a331388 100644 --- a/src/irc/dcc/dcc-chat.c +++ b/src/irc/dcc/dcc-chat.c @@ -64,7 +64,7 @@ static void cmd_msg(const char *data) char *text, *target; void *free_arg; - g_return_if_fail(text != NULL); + g_return_if_fail(data != NULL); if (*data != '=') { /* handle only DCC messages */ |