diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2010-10-31 18:10:51 +0100 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2010-10-31 18:10:51 +0100 |
commit | fce371e22a14ed55f246e1fe5413c5058b7fcae6 (patch) | |
tree | e7b82b693a4d046a42e008863d07c5fc2245f5f6 /src | |
parent | e442182a9683a713d3d97b452b4361ee0cd1d9a5 (diff) | |
download | weechat-fce371e22a14ed55f246e1fe5413c5058b7fcae6.zip |
Remove unused variables
Diffstat (limited to 'src')
-rw-r--r-- | src/core/wee-backtrace.c | 3 | ||||
-rw-r--r-- | src/gui/curses/gui-curses-bar-window.c | 4 | ||||
-rw-r--r-- | src/gui/curses/gui-curses-window.c | 3 | ||||
-rw-r--r-- | src/gui/gui-bar-window.c | 8 | ||||
-rw-r--r-- | src/plugins/irc/irc-command.c | 9 | ||||
-rw-r--r-- | src/plugins/irc/irc-config.c | 4 | ||||
-rw-r--r-- | src/plugins/irc/irc-ignore.c | 3 | ||||
-rw-r--r-- | src/plugins/scripts/ruby/weechat-ruby.c | 12 | ||||
-rw-r--r-- | src/plugins/xfer/xfer.c | 8 |
9 files changed, 10 insertions, 44 deletions
diff --git a/src/core/wee-backtrace.c b/src/core/wee-backtrace.c index 03e6ccd49..7ebc6e0b4 100644 --- a/src/core/wee-backtrace.c +++ b/src/core/wee-backtrace.c @@ -81,7 +81,6 @@ weechat_backtrace_addr2line (int number, void *address, const char *symbol) char cmd_line[1024]; char line[1024], *ptr_line, *pos; char function_name[1024]; - int file_line; rc = dladdr (address, &info); if ((rc == 0) || !info.dli_fname || !info.dli_fname[0]) @@ -106,7 +105,6 @@ weechat_backtrace_addr2line (int number, void *address, const char *symbol) return; } function_name[0] = '\0'; - file_line = 0; while (!feof (output)) { ptr_line = fgets (line, sizeof (line) - 1, output); @@ -117,7 +115,6 @@ weechat_backtrace_addr2line (int number, void *address, const char *symbol) pos[0] = '\0'; if (strchr (ptr_line, ':')) { - file_line = 1; weechat_backtrace_printf ("%03d %s%s%s%s", number, ptr_line, diff --git a/src/gui/curses/gui-curses-bar-window.c b/src/gui/curses/gui-curses-bar-window.c index 8b1eb336c..6130ccb04 100644 --- a/src/gui/curses/gui-curses-bar-window.c +++ b/src/gui/curses/gui-curses-bar-window.c @@ -422,7 +422,7 @@ gui_bar_window_draw (struct t_gui_bar_window *bar_window, int length_on_screen; int chars_available, index, size; int length_screen_before_cursor, length_screen_after_cursor; - int total_length_screen, diff, max_length, optimal_number_of_lines; + int diff, max_length, optimal_number_of_lines; int some_data_not_displayed; if (!gui_init_ok) @@ -563,8 +563,6 @@ gui_bar_window_draw (struct t_gui_bar_window *bar_window, length_screen_after_cursor = 0; } - total_length_screen = length_screen_before_cursor + length_screen_after_cursor; - diff = length_screen_before_cursor - chars_available; if (diff > 0) { diff --git a/src/gui/curses/gui-curses-window.c b/src/gui/curses/gui-curses-window.c index 865d1c488..7e215a5b7 100644 --- a/src/gui/curses/gui-curses-window.c +++ b/src/gui/curses/gui-curses-window.c @@ -330,11 +330,10 @@ gui_window_set_custom_color_fg_bg (WINDOW *window, int fg, int bg) void gui_window_set_custom_color_fg (WINDOW *window, int fg) { - int current_attr, current_bg; + int current_bg; if ((fg >= 0) && (fg < GUI_CURSES_NUM_WEECHAT_COLORS)) { - current_attr = window_current_style_attr; current_bg = window_current_style_bg; gui_window_remove_color_style (window, A_BOLD); gui_window_set_color_style (window, gui_weechat_colors[fg].attributes); diff --git a/src/gui/gui-bar-window.c b/src/gui/gui-bar-window.c index c3d6099ba..263292f4d 100644 --- a/src/gui/gui-bar-window.c +++ b/src/gui/gui-bar-window.c @@ -440,8 +440,8 @@ gui_bar_window_content_get_with_filling (struct t_gui_bar_window *bar_window, char *ptr_content, *content, reinit_color[32], reinit_color_space[32]; char *item_value, *item_value2, ****split_items, **linear_items; int index_content, content_length, i, first_sub_item, sub, j, k, index; - int length_reinit_color, length_reinit_color_space; - int length, max_length, max_length_screen, total_items, columns, lines; + int length_reinit_color_space, length, max_length, max_length_screen; + int total_items, columns, lines; if (!bar_window->items_subcount || !bar_window->items_content || !bar_window->items_refresh_needed) @@ -450,7 +450,6 @@ gui_bar_window_content_get_with_filling (struct t_gui_bar_window *bar_window, snprintf (reinit_color, sizeof (reinit_color), "%c", GUI_COLOR_RESET_CHAR); - length_reinit_color = strlen (reinit_color); snprintf (reinit_color_space, sizeof (reinit_color_space), "%c ", @@ -1147,7 +1146,8 @@ gui_bar_window_print_log (struct t_gui_bar_window *bar_window) { log_printf (" items_subcount[%03d]. . : %d", i, bar_window->items_subcount[i]); - if (bar_window->items_content && bar_window->bar->items_array) + if (bar_window->items_content && bar_window->bar + && bar_window->bar->items_array) { for (j = 0; j < bar_window->items_subcount[i]; j++) { diff --git a/src/plugins/irc/irc-command.c b/src/plugins/irc/irc-command.c index e2fe5baa1..fa021f3b8 100644 --- a/src/plugins/irc/irc-command.c +++ b/src/plugins/irc/irc-command.c @@ -2314,7 +2314,6 @@ irc_command_msg (void *data, struct t_gui_buffer *buffer, int argc, char **targets; int num_targets, i, arg_target, arg_text; char *msg_pwd_hidden; - struct t_irc_nick *ptr_nick; char *string; IRC_BUFFER_GET_SERVER_CHANNEL(buffer); @@ -2361,10 +2360,6 @@ irc_command_msg (void *data, struct t_gui_buffer *buffer, int argc, IRC_PLUGIN_NAME, "msg *"); return WEECHAT_RC_OK; } - if (ptr_channel->type == IRC_CHANNEL_TYPE_CHANNEL) - ptr_nick = irc_nick_search (ptr_channel, ptr_server->nick); - else - ptr_nick = NULL; string = irc_color_decode (argv_eol[arg_text], weechat_config_boolean (irc_config_network_colors_receive)); irc_input_user_message_display (ptr_channel->buffer, @@ -2385,10 +2380,6 @@ irc_command_msg (void *data, struct t_gui_buffer *buffer, int argc, targets[i]); if (ptr_channel) { - if (ptr_channel->type == IRC_CHANNEL_TYPE_CHANNEL) - ptr_nick = irc_nick_search (ptr_channel, ptr_server->nick); - else - ptr_nick = NULL; string = irc_color_decode (argv_eol[arg_text], weechat_config_boolean (irc_config_network_colors_receive)); irc_input_user_message_display (ptr_channel->buffer, diff --git a/src/plugins/irc/irc-config.c b/src/plugins/irc/irc-config.c index f64048ab4..00b5f9b12 100644 --- a/src/plugins/irc/irc-config.c +++ b/src/plugins/irc/irc-config.c @@ -782,7 +782,6 @@ irc_config_msgbuffer_create_option (void *data, { struct t_config_option *ptr_option; int rc; - const char *pos_name; /* make C compiler happy */ (void) data; @@ -807,9 +806,6 @@ irc_config_msgbuffer_create_option (void *data, { if (value) { - pos_name = strchr (option_name, '.'); - pos_name = (pos_name) ? pos_name + 1 : option_name; - ptr_option = weechat_config_new_option ( config_file, section, option_name, "integer", diff --git a/src/plugins/irc/irc-ignore.c b/src/plugins/irc/irc-ignore.c index d84bdaf04..e5118362a 100644 --- a/src/plugins/irc/irc-ignore.c +++ b/src/plugins/irc/irc-ignore.c @@ -188,7 +188,7 @@ irc_ignore_check (struct t_irc_server *server, const char *channel, const char *nick, const char *host) { struct t_irc_ignore *ptr_ignore; - int server_match, channel_match, regex_match; + int server_match, channel_match; if (!server) return 0; @@ -205,7 +205,6 @@ irc_ignore_check (struct t_irc_server *server, const char *channel, { server_match = 0; channel_match = 0; - regex_match = 0; if (!server || (strcmp (ptr_ignore->server, "*") == 0)) server_match = 1; diff --git a/src/plugins/scripts/ruby/weechat-ruby.c b/src/plugins/scripts/ruby/weechat-ruby.c index adb50a45a..48e348af5 100644 --- a/src/plugins/scripts/ruby/weechat-ruby.c +++ b/src/plugins/scripts/ruby/weechat-ruby.c @@ -169,7 +169,6 @@ struct t_hashtable * weechat_ruby_hash_to_hashtable (VALUE hash, int hashtable_size) { struct t_hashtable *hashtable; - struct st_table *st; hashtable = weechat_hashtable_new (hashtable_size, WEECHAT_HASHTABLE_STRING, @@ -179,13 +178,6 @@ weechat_ruby_hash_to_hashtable (VALUE hash, int hashtable_size) if (!hashtable) return NULL; - /* RHASH_TBL exists in ruby 1.8.7 but not ruby 1.8.6 */ -#ifdef RHASH_TBL - st = RHASH_TBL(hash); -#else - st = RHASH(hash)->tbl; -#endif - rb_hash_foreach (hash, &weechat_ruby_hash_foreach_cb, (unsigned long)hashtable); @@ -554,8 +546,8 @@ weechat_ruby_load (const char *filename) return 0; } - ruby_retcode = rb_protect_funcall (curModule, rb_intern("weechat_init"), - &ruby_error, 0, NULL); + (void) rb_protect_funcall (curModule, rb_intern("weechat_init"), + &ruby_error, 0, NULL); if (ruby_error) { diff --git a/src/plugins/xfer/xfer.c b/src/plugins/xfer/xfer.c index cb732a5d1..fa15b0064 100644 --- a/src/plugins/xfer/xfer.c +++ b/src/plugins/xfer/xfer.c @@ -705,12 +705,10 @@ xfer_add_cb (void *data, const char *signal, const char *type_data, struct t_infolist *infolist; const char *plugin_name, *plugin_id, *str_type, *str_protocol; const char *remote_nick, *local_nick, *charset_modifier, *filename, *proxy; - int type, protocol; + int type, protocol, args, port_start, port_end, sock, port; const char *weechat_dir; char *dir1, *dir2, *filename2, *short_filename, *pos; - int spaces, args, port_start, port_end; struct stat st; - int sock, port; struct hostent *host; struct sockaddr_in addr; socklen_t length; @@ -743,7 +741,6 @@ xfer_add_cb (void *data, const char *signal, const char *type_data, filename2 = NULL; short_filename = NULL; - spaces = 0; sock = -1; port = 0; @@ -998,15 +995,12 @@ xfer_add_cb (void *data, const char *signal, const char *type_data, /* convert spaces to underscore if asked and needed */ pos = short_filename; - spaces = 0; while (pos[0]) { if (pos[0] == ' ') { if (weechat_config_boolean (xfer_config_file_convert_spaces)) pos[0] = '_'; - else - spaces = 1; } pos++; } |