[-Wunused-but-set-variable] - remove

pull/1519/head
Richard Cohen 3 years ago
parent 0dd406de10
commit fe57fc4183

@ -771,7 +771,6 @@ gnc_menubar_model_update_item (GMenuModel *menu_model, const gchar *action_name,
GVariant *value;
GVariant *old_target = NULL;
const gchar *old_action = NULL;
const gchar *old_label = NULL;
const gchar *old_temp = NULL;
const gchar *old_accel = NULL;
GMenuItem *item;
@ -782,9 +781,6 @@ gnc_menubar_model_update_item (GMenuModel *menu_model, const gchar *action_name,
if (g_str_equal (key, GNC_MENU_ATTRIBUTE_TEMPORARY) &&
g_variant_is_of_type (value, G_VARIANT_TYPE_STRING))
old_temp = g_variant_get_string (value, NULL);
else if (g_str_equal (key, G_MENU_ATTRIBUTE_LABEL) &&
g_variant_is_of_type (value, G_VARIANT_TYPE_STRING))
old_label = g_variant_get_string (value, NULL);
else if (g_str_equal (key, G_MENU_ATTRIBUTE_ACTION) &&
g_variant_is_of_type (value, G_VARIANT_TYPE_STRING))
old_action = g_variant_get_string (value, NULL);

@ -1834,7 +1834,6 @@ gnc_main_window_update_one_menu_action (GncMainWindow *window,
static void
gnc_main_window_update_radio_button (GncMainWindow *window)
{
GncMainWindowPrivate *priv;
GAction *action;
gsize index;
@ -1849,8 +1848,6 @@ gnc_main_window_update_radio_button (GncMainWindow *window)
return;
}
priv = GNC_MAIN_WINDOW_GET_PRIVATE(window);
action = g_action_map_lookup_action (G_ACTION_MAP(window),
"WindowAction");
@ -2456,7 +2453,6 @@ main_window_update_page_set_read_only_icon (GncPluginPage *page,
gboolean read_only)
{
GncMainWindow *window;
GncMainWindowPrivate *priv;
GtkWidget *tab_widget;
GtkWidget *image = NULL;
GList *children;
@ -2474,7 +2470,6 @@ main_window_update_page_set_read_only_icon (GncPluginPage *page,
/* Get the notebook tab widget */
main_window_find_tab_widget (window, page, &tab_widget);
priv = GNC_MAIN_WINDOW_GET_PRIVATE(window);
if (!tab_widget)
{
@ -3463,7 +3458,6 @@ gnc_main_window_merge_actions (GncMainWindow *window,
const gchar *ui_filename,
gpointer user_data)
{
GncMainWindowPrivate *priv;
GncMainWindowActionData *data;
GSimpleActionGroup *simple_action_group;
@ -3476,8 +3470,6 @@ gnc_main_window_merge_actions (GncMainWindow *window,
data->window = window;
data->data = user_data;
priv = GNC_MAIN_WINDOW_GET_PRIVATE(window);
simple_action_group = g_simple_action_group_new ();
g_action_map_add_action_entries (G_ACTION_MAP(simple_action_group),
@ -3511,14 +3503,11 @@ gnc_main_window_unmerge_actions (GncMainWindow *window,
GAction *
gnc_main_window_find_action (GncMainWindow *window, const gchar *action_name)
{
GncMainWindowPrivate *priv;
GAction *action = nullptr;
g_return_val_if_fail (GNC_IS_MAIN_WINDOW(window), nullptr);
g_return_val_if_fail (action_name != nullptr, nullptr);
priv = GNC_MAIN_WINDOW_GET_PRIVATE(window);
action = g_action_map_lookup_action (G_ACTION_MAP(window),
action_name);

@ -854,7 +854,6 @@ gnc_plugin_page_main_window_changed (GtkWindow *window,
{
GncPluginPage *current_plugin_page = GNC_PLUGIN_PAGE(object);
GncPluginPage *plugin_page = GNC_PLUGIN_PAGE(user_data);
GncPluginPagePrivate *priv;
gboolean on_current_page = FALSE;
// Continue if current_plugin_page is valid
@ -865,8 +864,6 @@ gnc_plugin_page_main_window_changed (GtkWindow *window,
if (!plugin_page || !GNC_IS_PLUGIN_PAGE(plugin_page))
return;
priv = GNC_PLUGIN_PAGE_GET_PRIVATE(plugin_page);
if (current_plugin_page == plugin_page)
on_current_page = TRUE;

@ -425,13 +425,9 @@ void
gnc_report_combo_set_active_guid_name (GncReportCombo *grc,
const gchar *guid_name)
{
GncReportComboPrivate *priv;
g_return_if_fail (grc != NULL);
g_return_if_fail (GNC_IS_REPORT_COMBO(grc));
priv = GET_PRIVATE(grc);
if (guid_name && *guid_name)
{
gchar *guid = NULL;

@ -1413,9 +1413,7 @@ void gnc_tree_view_expand_columns (GncTreeView *view,
gchar *first_column_name,
...)
{
GncTreeViewPrivate *priv;
GtkTreeViewColumn *column;
gboolean hide_spacer;
GList *columns, *tmp;
gchar *name, *pref_name;
va_list args;
@ -1423,9 +1421,7 @@ void gnc_tree_view_expand_columns (GncTreeView *view,
g_return_if_fail (GNC_IS_TREE_VIEW(view));
ENTER(" ");
va_start (args, first_column_name);
priv = GNC_TREE_VIEW_GET_PRIVATE(view);
name = first_column_name;
hide_spacer = FALSE;
/* First disable the expand property on all (non-infrastructure) columns. */
columns = gtk_tree_view_get_columns (GTK_TREE_VIEW(view));
@ -1445,7 +1441,6 @@ void gnc_tree_view_expand_columns (GncTreeView *view,
if (column != NULL)
{
gtk_tree_view_column_set_expand (column, TRUE);
hide_spacer = TRUE;
}
name = va_arg (args, gchar*);
}

@ -1439,12 +1439,10 @@ gbv_renderer_add_padding (GtkCellRenderer *renderer)
static GtkTreeViewColumn*
gbv_create_totals_column (GncBudgetView *budget_view, gint period_num)
{
GncBudgetViewPrivate *priv;
GtkTreeViewColumn *col;
GtkCellRenderer* renderer;
g_return_val_if_fail (budget_view != NULL, NULL);
priv = GNC_BUDGET_VIEW_GET_PRIVATE(budget_view);
renderer = gtk_cell_renderer_text_new ();
col = gtk_tree_view_column_new_with_attributes ("", renderer, NULL);

@ -1243,7 +1243,6 @@ gnc_plugin_page_budget_cmd_budget_note (GSimpleAction *simple,
{
GncPluginPageBudget *page = user_data;
GncPluginPageBudgetPrivate *priv;
GtkTreeSelection *sel;
GtkWidget *dialog, *note;
gint result;
GtkBuilder *builder;
@ -1255,8 +1254,6 @@ gnc_plugin_page_budget_cmd_budget_note (GSimpleAction *simple,
g_return_if_fail(GNC_IS_PLUGIN_PAGE_BUDGET(page));
priv = GNC_PLUGIN_PAGE_BUDGET_GET_PRIVATE(page);
sel = gnc_budget_view_get_selection(priv->budget_view);
gtk_tree_view_get_cursor(
GTK_TREE_VIEW(gnc_budget_view_get_account_tree_view(priv->budget_view)),
&path, &col);

@ -1318,14 +1318,12 @@ gnc_plugin_page_invoice_cmd_link_remove (GSimpleAction *simple,
{
GncPluginPageInvoice *plugin_page = user_data;
GncPluginPageInvoicePrivate *priv;
GtkWindow *parent;
GncInvoice *invoice;
GtkWidget *doclink_button;
g_return_if_fail (GNC_IS_PLUGIN_PAGE_INVOICE(plugin_page));
ENTER("(action %p, plugin_page %p)", simple, plugin_page);
priv = GNC_PLUGIN_PAGE_INVOICE_GET_PRIVATE(plugin_page);
parent = GTK_WINDOW(gnc_plugin_page_get_window (GNC_PLUGIN_PAGE(plugin_page)));
invoice = gnc_invoice_window_get_invoice (priv->iw);
gncInvoiceSetDocLink (invoice, "");

@ -3695,14 +3695,12 @@ gnc_plugin_page_register_cmd_edit_tax_options (GSimpleAction *simple,
gpointer user_data)
{
GncPluginPageRegister* page = user_data;
GncPluginPageRegisterPrivate* priv;
GtkWidget *window;
Account* account;
g_return_if_fail (GNC_IS_PLUGIN_PAGE_REGISTER (page));
ENTER ("(action %p, page %p)", simple, page);
priv = GNC_PLUGIN_PAGE_REGISTER_GET_PRIVATE (page);
window = gnc_plugin_page_get_window (GNC_PLUGIN_PAGE (page));
account = gnc_plugin_page_register_get_account (page);
gnc_tax_info_dialog (window, account);

@ -361,7 +361,6 @@ gnc_reconcile_view_new (Account *account, GNCReconcileViewType type,
GNCReconcileView *view;
GtkListStore *liststore;
GtkTreeSortable *sortable;
GtkTreeViewColumn *col;
gboolean include_children, auto_check;
GList *accounts = NULL;
GList *splits;
@ -436,7 +435,6 @@ gnc_reconcile_view_new (Account *account, GNCReconcileViewType type,
/* set up a separate sort function for the recn column as it is
* derived from a search function */
sortable = GTK_TREE_SORTABLE(gtk_tree_view_get_model (GTK_TREE_VIEW(view)));
col = gtk_tree_view_get_column (GTK_TREE_VIEW(view), REC_RECN -1);
gtk_tree_sortable_set_sort_func (sortable, REC_RECN, sort_iter_compare_func,
GINT_TO_POINTER (REC_RECN), NULL);

@ -621,8 +621,6 @@ gnc_bi_import_create_bis (GtkListStore * store, QofBook * book,
GtkWidget *dialog;
time64 today;
InvoiceWindow *iw;
gint64 denom = 0;
gnc_commodity *currency;
GString *running_id;
// these arguments are needed
@ -771,8 +769,6 @@ gnc_bi_import_create_bis (GtkListStore * store, QofBook * book,
// Add entry to invoice/bill
entry = gncEntryCreate (book);
gncEntryBeginEdit(entry);
currency = gncInvoiceGetCurrency(invoice);
if (currency) denom = gnc_commodity_get_fraction(currency);
qof_scan_date (date, &day, &month, &year);
{
GDate *date = g_date_new_dmy(day, month, year);

@ -884,7 +884,6 @@ gnc_import_process_trans_item (Account *base_acc,
auto split = xaccMallocSplit (gnc_account_get_book (acct));
xaccTransAppendSplit (trans, split);
xaccAccountInsertSplit (acct, split);
auto imbalance_value = gnc_numeric_neg (xaccTransGetImbalanceValue (trans));
xaccSplitSetValue (split, trans_info->lsplit_value);
if (!gnc_numeric_zero_p (trans_info->lsplit_amount))
xaccSplitSetAmount (split, trans_info->lsplit_amount);

@ -401,7 +401,7 @@ static void
resolve_conflicts (GNCImportMainMatcher *info)
{
GtkTreeModel* model = gtk_tree_view_get_model (info->view);
GtkTreeIter import_iter, best_import;
GtkTreeIter import_iter;
gint best_match = 0;
/* A greedy conflict resolution. Find all imported trans that vie for the same
@ -420,7 +420,6 @@ resolve_conflicts (GNCImportMainMatcher *info)
// The ID of the best current match for this imported trans
GncGUID id = *get_top_trans_match_id (match_list);
best_match = get_top_trans_match_score (match_list);
best_import = import_iter;
/* Get a list of all imported transactions that have a conflict with this one.
* The returned list excludes the best transaction. */
GList *conflicts = get_conflict_list (model, import_iter, &id, best_match);

@ -168,10 +168,7 @@ gnc_quickfill_cell_modify_verify (BasicCell *_cell,
QuickFill *match;
glong newval_chars;
glong change_chars;
newval_chars = g_utf8_strlen(newval, newval_len);
change_chars = g_utf8_strlen(change, change_len);
/* If deleting, just accept */
if (change == NULL)

@ -362,7 +362,6 @@ gnucash_sheet_activate_cursor_cell (GnucashSheet *sheet,
Table *table = sheet->table;
VirtualLocation virt_loc;
SheetBlockStyle *style;
GtkEditable *editable;
int cursor_pos, start_sel, end_sel;
gboolean allow_edits;
@ -384,8 +383,6 @@ gnucash_sheet_activate_cursor_cell (GnucashSheet *sheet,
if (strcmp (style->cursor->cursor_name, CURSOR_HEADER) == 0)
return;
editable = GTK_EDITABLE(sheet->entry);
cursor_pos = -1;
start_sel = 0;
end_sel = 0;
@ -1887,14 +1884,12 @@ static gint
gnucash_sheet_key_press_event (GtkWidget *widget, GdkEventKey *event)
{
GnucashSheet *sheet;
GtkEditable *editable = NULL;
g_return_val_if_fail (widget != NULL, TRUE);
g_return_val_if_fail (GNUCASH_IS_SHEET(widget), TRUE);
g_return_val_if_fail (event != NULL, TRUE);
sheet = GNUCASH_SHEET(widget);
editable = GTK_EDITABLE(sheet->entry);
/* bug#60582 comment#27 2
save shift state to enable <shift minus> and <shift equal>
bug#618434

Loading…
Cancel
Save