mirror of
https://github.com/irssi/irssi.git
synced 2024-12-04 14:46:39 -05:00
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
This commit is contained in:
parent
c4af878047
commit
14e5dc8b8e
@ -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;
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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)
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user