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;
|
match = 0;
|
||||||
for (n = 0; levels[n] != NULL; n++) {
|
for (n = 0; levels[n] != NULL; n++) {
|
||||||
if (strncmp(levels[n], level, len) == 0) {
|
if (strncmp(levels[n], level, len) == 0) {
|
||||||
if (strlen(levels[n]) == len) {
|
if ((int)strlen(levels[n]) == len) {
|
||||||
/* full match */
|
/* full match */
|
||||||
return 1L << n;
|
return 1L << n;
|
||||||
}
|
}
|
||||||
|
@ -130,7 +130,7 @@ static int nick_completion_timeout(void)
|
|||||||
last_msgs_remove_old(&channel->lastmsgs, keep_msgs_time, now);
|
last_msgs_remove_old(&channel->lastmsgs, keep_msgs_time, now);
|
||||||
|
|
||||||
if (keep_msgs_count == 0 ||
|
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,
|
last_msgs_remove_old(&channel->lastownmsgs,
|
||||||
keep_ownmsgs_time, now);
|
keep_ownmsgs_time, now);
|
||||||
}
|
}
|
||||||
|
@ -361,7 +361,7 @@ static GList *completion_get_subcommands(const char *cmd)
|
|||||||
for (tmp = commands; tmp != NULL; tmp = tmp->next) {
|
for (tmp = commands; tmp != NULL; tmp = tmp->next) {
|
||||||
COMMAND_REC *rec = tmp->data;
|
COMMAND_REC *rec = tmp->data;
|
||||||
|
|
||||||
if (strlen(rec->cmd) < len)
|
if ((int)strlen(rec->cmd) < len)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (strchr(rec->cmd+len, ' ') != NULL)
|
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) {
|
if (p != NULL) {
|
||||||
g_string_append_c(out, 4);
|
g_string_append_c(out, 4);
|
||||||
g_string_append_c(out, FORMAT_COLOR_NOCHANGE);
|
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;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -96,7 +96,7 @@ int format_expand_styles(GString *out, char format, TEXT_DEST_REC *dest)
|
|||||||
p = strchr(fores, format);
|
p = strchr(fores, format);
|
||||||
if (p != NULL) {
|
if (p != NULL) {
|
||||||
g_string_append_c(out, 4);
|
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);
|
g_string_append_c(out, FORMAT_COLOR_NOCHANGE);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -106,7 +106,7 @@ int format_expand_styles(GString *out, char format, TEXT_DEST_REC *dest)
|
|||||||
p = strchr(boldfores, format);
|
p = strchr(boldfores, format);
|
||||||
if (p != NULL) {
|
if (p != NULL) {
|
||||||
g_string_append_c(out, 4);
|
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);
|
g_string_append_c(out, FORMAT_COLOR_NOCHANGE);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -64,7 +64,7 @@ static void cmd_msg(const char *data)
|
|||||||
char *text, *target;
|
char *text, *target;
|
||||||
void *free_arg;
|
void *free_arg;
|
||||||
|
|
||||||
g_return_if_fail(text != NULL);
|
g_return_if_fail(data != NULL);
|
||||||
|
|
||||||
if (*data != '=') {
|
if (*data != '=') {
|
||||||
/* handle only DCC messages */
|
/* handle only DCC messages */
|
||||||
|
Loading…
Reference in New Issue
Block a user