1
0
mirror of https://github.com/irssi/irssi.git synced 2024-12-04 14:46:39 -05:00

more warning fixes

git-svn-id: http://svn.irssi.org/repos/irssi/trunk@863 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2000-11-23 23:06:29 +00:00 committed by cras
parent 5f2f6886c8
commit 4e0166a44d
5 changed files with 7 additions and 13 deletions

View File

@ -861,12 +861,10 @@ static void cmd_save(void)
static void complete_format_list(THEME_SEARCH_REC *rec, const char *key, GList **list) static void complete_format_list(THEME_SEARCH_REC *rec, const char *key, GList **list)
{ {
MODULE_THEME_REC *theme;
FORMAT_REC *formats; FORMAT_REC *formats;
int n, len; int n, len;
formats = g_hash_table_lookup(default_formats, rec->name); formats = g_hash_table_lookup(default_formats, rec->name);
theme = g_hash_table_lookup(current_theme->modules, rec->name);
len = strlen(key); len = strlen(key);
for (n = 1; formats[n].def != NULL; n++) { for (n = 1; formats[n].def != NULL; n++) {

View File

@ -130,16 +130,16 @@ static TEXT_CHUNK_REC *text_chunk_find(GUI_WINDOW_REC *gui, const char *data)
void gui_window_line_text_free(GUI_WINDOW_REC *gui, LINE_REC *line) void gui_window_line_text_free(GUI_WINDOW_REC *gui, LINE_REC *line)
{ {
TEXT_CHUNK_REC *chunk; TEXT_CHUNK_REC *chunk;
const unsigned char *text; const char *text;
text = line->text; text = line->text;
for (;;) { for (;;) {
if (*text == '\0') { if (*text == '\0') {
text++; text++;
if (*text == LINE_CMD_EOL) if ((unsigned char) *text == LINE_CMD_EOL)
break; break;
if (*text == LINE_CMD_CONTINUE) { if ((unsigned char) *text == LINE_CMD_CONTINUE) {
unsigned char *tmp; unsigned char *tmp;
memcpy(&tmp, text+1, sizeof(char *)); memcpy(&tmp, text+1, sizeof(char *));
@ -152,7 +152,7 @@ void gui_window_line_text_free(GUI_WINDOW_REC *gui, LINE_REC *line)
text = tmp; text = tmp;
continue; continue;
} }
if (*text & 0x80) if ((unsigned char) *text & 0x80)
text++; text++;
} }

View File

@ -35,6 +35,7 @@
#include <signal.h> #include <signal.h>
#undef CTRL
#define CTRL(x) ((x) & 0x1f) /* Ctrl+x */ #define CTRL(x) ((x) & 0x1f) /* Ctrl+x */
typedef void (*ENTRY_REDIRECT_KEY_FUNC) (int key, void *data, SERVER_REC *server, WI_ITEM_REC *item); typedef void (*ENTRY_REDIRECT_KEY_FUNC) (int key, void *data, SERVER_REC *server, WI_ITEM_REC *item);

View File

@ -945,7 +945,7 @@ static char *gui_window_line_get_format(WINDOW_REC *window, LINE_REC *line,
TEXT_DEST_REC dest; TEXT_DEST_REC dest;
int formatnum, argcount; int formatnum, argcount;
text = line->text; text = (const unsigned char *) line->text;
/* skip the beginning of the line until we find the format */ /* skip the beginning of the line until we find the format */
g_free(line_read_format(&text)); g_free(line_read_format(&text));
@ -975,11 +975,6 @@ static char *gui_window_line_get_format(WINDOW_REC *window, LINE_REC *line,
if (formatnum == -1) if (formatnum == -1)
ret = NULL; ret = NULL;
else { else {
THEME_REC *theme;
theme = window->theme == NULL ? current_theme :
window->theme;
argcount = 0; argcount = 0;
while (*text != '\0' || text[1] != LINE_CMD_EOL) { while (*text != '\0' || text[1] != LINE_CMD_EOL) {
args[argcount] = line_read_format(&text); args[argcount] = line_read_format(&text);

View File

@ -488,7 +488,7 @@ int perl_input_add(int source, int condition,
rec = g_new(PERL_SOURCE_REC, 1); rec = g_new(PERL_SOURCE_REC, 1);
rec->func = g_strdup_printf("%s::%s", perl_get_package(), func); rec->func = g_strdup_printf("%s::%s", perl_get_package(), func);
rec->data = g_strdup(data); rec->data = g_strdup(data);
rec->tag = g_input_add(source, condition, rec->tag = g_input_add(source, (GInputCondition) condition,
(GInputFunction) perl_source_event, rec); (GInputFunction) perl_source_event, rec);
perl_sources = g_slist_append(perl_sources, rec); perl_sources = g_slist_append(perl_sources, rec);