1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-12 14:14:48 +02:00

Remove dead assignments

This commit is contained in:
Sebastien Helleu
2010-10-31 18:23:16 +01:00
parent 06b48ccf83
commit ac6b299e8b
10 changed files with 8 additions and 24 deletions
+2 -4
View File
@@ -155,7 +155,6 @@ command_bar (void *data, struct t_gui_buffer *buffer,
int argc, char **argv, char **argv_eol)
{
int type, position;
long number;
char *error, *str_type, *pos_condition;
struct t_gui_bar *ptr_bar;
struct t_gui_bar_item *ptr_item;
@@ -254,7 +253,7 @@ command_bar (void *data, struct t_gui_buffer *buffer,
return WEECHAT_RC_ERROR;
}
error = NULL;
number = strtol (argv[5], &error, 10);
(void) strtol (argv[5], &error, 10);
if (error && !error[0])
{
/* create bar */
@@ -3035,7 +3034,6 @@ command_proxy (void *data, struct t_gui_buffer *buffer,
int argc, char **argv, char **argv_eol)
{
int type;
long number;
char *error;
struct t_proxy *ptr_proxy;
@@ -3074,7 +3072,7 @@ command_proxy (void *data, struct t_gui_buffer *buffer,
return WEECHAT_RC_ERROR;
}
error = NULL;
number = strtol (argv[5], &error, 10);
(void) strtol (argv[5], &error, 10);
if (error && !error[0])
{
/* create proxy */
-2
View File
@@ -677,7 +677,6 @@ string_has_highlight (const char *string, const char *highlight_words)
/* highlight found! */
while ((match = strstr (msg_pos, pos)) != NULL)
{
match_pre = match - 1;
match_pre = utf8_prev_char (msg, match);
if (!match_pre)
match_pre = match - 1;
@@ -813,7 +812,6 @@ string_split (const char *string, const char *separators, int keep_eol,
return NULL;
ptr1 = string2;
ptr2 = string2;
for (i = 0; i < n_items; i++)
{
+1 -1
View File
@@ -511,7 +511,7 @@ upgrade_weechat_read_cb (void *data,
ptr_group = gui_nicklist_search_group (upgrade_current_buffer,
NULL,
group_name);
ptr_group = gui_nicklist_add_group (
gui_nicklist_add_group (
upgrade_current_buffer,
ptr_group,
name,
+5 -5
View File
@@ -530,7 +530,7 @@ void
gui_layout_window_apply_tree (struct t_gui_layout_window *layout_window,
int internal_id_current_window)
{
struct t_gui_window *new_window, *old_window;
struct t_gui_window *old_window;
if (layout_window->split_pct != 0)
{
@@ -539,13 +539,13 @@ gui_layout_window_apply_tree (struct t_gui_layout_window *layout_window,
if (layout_window->split_horiz)
{
new_window = gui_window_split_horizontal (gui_current_window,
layout_window->split_pct);
gui_window_split_horizontal (gui_current_window,
layout_window->split_pct);
}
else
{
new_window = gui_window_split_vertical (gui_current_window,
layout_window->split_pct);
gui_window_split_vertical (gui_current_window,
layout_window->split_pct);
}
if (layout_window->child2)
-2
View File
@@ -238,8 +238,6 @@ alias_config_cmd_create_option_cb (void *data,
(void) config_file;
(void) section;
rc = WEECHAT_CONFIG_OPTION_SET_ERROR;
/* create config option */
alias_config_cmd_new_option (option_name, value);
-2
View File
@@ -104,8 +104,6 @@ irc_mode_channel_set (struct t_irc_server *server,
set_flag = '-';
break;
case 'b': /* ban (ignored) */
ptr_arg = ((current_arg >= 0) && (current_arg < argc)) ?
argv[current_arg] : NULL;
current_arg++;
break;
case 'k': /* channel key */
-3
View File
@@ -146,8 +146,6 @@ irc_sasl_mechanism_dh_blowfish (const char *data_base64,
goto end;
data_server_pub_key = gcry_mpi_new (size * 8);
gcry_mpi_scan (&data_server_pub_key, GCRYMPI_FMT_USG, ptr_data, size, NULL);
ptr_data += size;
length_data -= size;
/* generate keys */
pub_key = gcry_mpi_new (num_bits_prime_number);
@@ -208,7 +206,6 @@ irc_sasl_mechanism_dh_blowfish (const char *data_base64,
memcpy (ptr_answer, sasl_username, length_username + 1);
ptr_answer += length_username + 1;
memcpy (ptr_answer, password_crypted, length_password);
ptr_answer += length_password;
/* encode answer to base64 */
answer_base64 = malloc (length_answer * 2);
-1
View File
@@ -908,7 +908,6 @@ irc_server_apply_command_line_options (struct t_irc_server *server,
if (argv[i][0] == '-')
{
pos = strchr (argv[i], '=');
ptr_value = value_boolean[0];
if (pos)
{
option_name = weechat_strndup (argv[i] + 1, pos - argv[i] - 1);
-2
View File
@@ -84,8 +84,6 @@ plugin_config_set_internal (const char *option, const char *value)
int rc;
struct t_config_option *ptr_option;
rc = WEECHAT_CONFIG_OPTION_SET_ERROR;
ptr_option = config_file_search_option (plugin_config_file,
plugin_config_section_var,
option);
-2
View File
@@ -183,8 +183,6 @@ rmodifier_config_modifier_create_option_cb (void *data,
(void) config_file;
(void) section;
rc = WEECHAT_CONFIG_OPTION_SET_ERROR;
/* create rmodifier */
ptr_rmodifier = rmodifier_search (option_name);
if (ptr_rmodifier)