From 9dd2c1b616cdbdce84ee055e10e6418eb1727010 Mon Sep 17 00:00:00 2001 From: Sebastien Helleu Date: Wed, 7 Jan 2009 14:27:29 +0100 Subject: [PATCH] Remove some compiler warnings --- src/core/wee-config-file.c | 6 ++---- src/gui/gtk/gui-gtk-chat.c | 17 ++++++++++------- src/gui/gui-completion.c | 3 ++- 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/src/core/wee-config-file.c b/src/core/wee-config-file.c index 539a6887f..8d4b79439 100644 --- a/src/core/wee-config-file.c +++ b/src/core/wee-config-file.c @@ -2180,7 +2180,7 @@ config_file_option_free (struct t_config_option *option) if (!option) return; - + ptr_section = option->section; /* remove option from section */ @@ -2197,15 +2197,13 @@ config_file_option_free (struct t_config_option *option) new_options = option->next_option; if (option->next_option) (option->next_option)->prev_option = option->prev_option; + ptr_section->options = new_options; } /* free data */ config_file_option_free_data (option); free (option); - - if (ptr_section) - ptr_section->options = new_options; } /* diff --git a/src/gui/gtk/gui-gtk-chat.c b/src/gui/gtk/gui-gtk-chat.c index d5fc0c078..7b009f83c 100644 --- a/src/gui/gtk/gui-gtk-chat.c +++ b/src/gui/gtk/gui-gtk-chat.c @@ -470,14 +470,16 @@ gui_chat_draw (struct t_gui_buffer *buffer, int erase) void gui_chat_draw_line (struct t_gui_buffer *buffer, struct t_gui_line *line) { - struct t_gui_window *ptr_win; - unsigned char *message_without_color; - GtkTextIter start, end; + //struct t_gui_window *ptr_win; + //unsigned char *message_without_color; + //GtkTextIter start, end; (void) buffer; + (void) line; - //ptr_win = gui_buffer_find_window (buffer); - //if (ptr_win) + /* + ptr_win = gui_buffer_find_window (buffer); + if (ptr_win) { message_without_color = gui_color_decode ((unsigned char *)(line->message)); if (message_without_color) @@ -488,9 +490,10 @@ gui_chat_draw_line (struct t_gui_buffer *buffer, struct t_gui_line *line) "\n", -1); gtk_text_buffer_get_bounds (GUI_WINDOW_OBJECTS(ptr_win)->textbuffer_chat, &start, &end); - /* TODO */ - /*gtk_text_buffer_apply_tag (ptr_win->textbuffer_chat, ptr_win->texttag_chat, &start, &end);*/ + // TODO + //gtk_text_buffer_apply_tag (ptr_win->textbuffer_chat, ptr_win->texttag_chat, &start, &end); free (message_without_color); } } + */ } diff --git a/src/gui/gui-completion.c b/src/gui/gui-completion.c index 477433217..dadd60b12 100644 --- a/src/gui/gui-completion.c +++ b/src/gui/gui-completion.c @@ -812,7 +812,8 @@ gui_completion_list_add_option_value (struct t_gui_completion *completion) 0, WEECHAT_LIST_POS_BEGINNING); if (option_found->value) { - value_string = malloc (64); + length = 64; + value_string = malloc (length); if (value_string) { snprintf (value_string, length,