mirror of
https://github.com/Gnucash/gnucash.git
synced 2024-11-21 16:38:06 -06:00
Remove some unused variables with obviously no side effects
This commit is contained in:
parent
4e25bbfc43
commit
ea2d3be217
@ -810,7 +810,6 @@ gnc_scm2query_term_query_v1 (SCM query_term_scm)
|
||||
{
|
||||
QofQueryCompare how;
|
||||
QofNumericMatch amt_sgn;
|
||||
double amount;
|
||||
gnc_numeric val;
|
||||
|
||||
/* how */
|
||||
@ -1882,7 +1881,6 @@ scm_hook_cb (gpointer data, GncScmDangler *scm)
|
||||
void
|
||||
gnc_hook_add_scm_dangler (const gchar *name, SCM proc)
|
||||
{
|
||||
GHook *hook;
|
||||
GncScmDangler *scm;
|
||||
int num_args;
|
||||
|
||||
|
@ -703,7 +703,6 @@ load( state *s, char *testfile)
|
||||
while (fgets(buf, BUFSIZE, f) && (buf[0] != '.')) {
|
||||
ub4 curr = 0; /* current offset into buf */
|
||||
ub4 value; /* token value */
|
||||
token_type token; /* token type */
|
||||
ub4 i;
|
||||
test *t;
|
||||
|
||||
@ -836,7 +835,7 @@ parse_w( state *s, sb1 *myarg)
|
||||
ub4 dimension_number;
|
||||
ub4 curr = 0;
|
||||
ub4 fe_len, value;
|
||||
ub4 i, j, k;
|
||||
ub4 i, j;
|
||||
size_t len = strlen(myarg);
|
||||
token_type t = parse_token(myarg, len, &curr, &value);
|
||||
|
||||
@ -1186,7 +1185,6 @@ build_tuples( state *s, ub2 d, ub2 f)
|
||||
feature tuple[MAX_N]; /* n-tuples that include (d,f) */
|
||||
sb4 i, j, n;
|
||||
ub8 count = 0;
|
||||
test *t;
|
||||
tu_iter ctx;
|
||||
|
||||
if (s->tc[d][f] > 0 || s->n[d][f] == s->n_final) {
|
||||
@ -1282,7 +1280,6 @@ test *t, /* test being built */
|
||||
ub1 *mut) /* mut[i] = 1 if I am allowed to adjust dimension i */
|
||||
{
|
||||
ub4 i;
|
||||
without *w; /* one of the disobeyed withouts */
|
||||
ub4 count; /* number of withouts currently hit */
|
||||
ub2 ndim; /* size of dimord[] */
|
||||
ub2 temp;
|
||||
@ -1552,7 +1549,6 @@ cover_tuples( state *s)
|
||||
|
||||
/* find a good test */
|
||||
for (i=0; i<GROUP_SIZE; ++i) {
|
||||
tu_iter ctx;
|
||||
sb4 this_count;
|
||||
|
||||
/* generate a test that covers the first tuple */
|
||||
|
@ -251,7 +251,6 @@ listen_for_account_events (QofInstance* entity, QofEventId event_type,
|
||||
find_data data = { 0 };
|
||||
GtkTreePath* path;
|
||||
GList* tmp;
|
||||
gboolean valid;
|
||||
|
||||
if (0 == (event_type & (QOF_EVENT_MODIFY | QOF_EVENT_ADD | QOF_EVENT_REMOVE)))
|
||||
return;
|
||||
|
@ -394,7 +394,6 @@ gnc_doclink_pref_path_head_changed (GtkWindow *parent, const gchar *old_path_hea
|
||||
GtkBuilder *builder;
|
||||
GtkWidget *use_old_path_head, *use_new_path_head;
|
||||
GtkWidget *old_head_label, *new_head_label;
|
||||
GtkWidget *old_hbox, *new_hbox;
|
||||
gint result;
|
||||
gchar *new_path_head_uri = gnc_doclink_get_path_head ();
|
||||
|
||||
|
@ -118,7 +118,6 @@ gnc_dup_key_press_event_cb (GtkWidget *widget, GdkEventKey *event, gpointer user
|
||||
{
|
||||
GdkModifierType modifiers = gtk_accelerator_get_default_mod_mask ();
|
||||
gint increment;
|
||||
long int num;
|
||||
|
||||
if ((event->state & modifiers) == GDK_CONTROL_MASK ||
|
||||
(event->state & modifiers) == GDK_MOD1_MASK)
|
||||
|
@ -72,7 +72,6 @@ geturl( FileAccessWindow* faw )
|
||||
{
|
||||
gchar* url = NULL;
|
||||
const gchar* host = NULL;
|
||||
const gchar* database = NULL;
|
||||
const gchar* username = NULL;
|
||||
const gchar* password = NULL;
|
||||
/* Not const as return value of gtk_combo_box_text_get_active_text must be freed */
|
||||
|
@ -31,8 +31,6 @@
|
||||
#include "qof.h"
|
||||
#include "gnc-autoclear.h"
|
||||
|
||||
static QofLogModule log_module = GNC_MOD_GUI;
|
||||
|
||||
/* the following functions are used in window-autoclear: */
|
||||
|
||||
#define MAXIMUM_SACK_SIZE 1000000
|
||||
|
@ -83,17 +83,6 @@ enum
|
||||
PAGE_MONTHLY
|
||||
};
|
||||
|
||||
static const struct pageDataTuple PAGES[] =
|
||||
{
|
||||
{ PAGE_NONE, UIFREQ_NONE, "None" },
|
||||
{ PAGE_ONCE, UIFREQ_ONCE, "Once" },
|
||||
{ PAGE_DAILY, UIFREQ_DAILY, "Daily" },
|
||||
{ PAGE_WEEKLY, UIFREQ_WEEKLY, "Weekly" },
|
||||
{ PAGE_SEMI_MONTHLY, UIFREQ_SEMI_MONTHLY, "Semi-Monthly" },
|
||||
{ PAGE_MONTHLY, UIFREQ_MONTHLY, "Monthly" },
|
||||
{ 0, 0, 0 }
|
||||
};
|
||||
|
||||
static const char *CHECKBOX_NAMES[] =
|
||||
{
|
||||
"wd_check_sun",
|
||||
|
@ -753,7 +753,6 @@ gnc_menubar_model_update_item (GMenuModel *menu_model, const gchar *action_name,
|
||||
const gchar *label, const gchar *tooltip)
|
||||
{
|
||||
GncMenuModelSearch *gsm;
|
||||
GtkWidget *menu_item = NULL;
|
||||
gboolean found = FALSE;
|
||||
|
||||
g_return_val_if_fail (menu_model != NULL, FALSE);
|
||||
|
@ -1102,7 +1102,6 @@ gnc_main_window_all_finish_pending (void)
|
||||
static gboolean
|
||||
gnc_main_window_page_exists (GncPluginPage *page)
|
||||
{
|
||||
GncMainWindow *window;
|
||||
GncMainWindowPrivate *priv;
|
||||
GList *walker;
|
||||
|
||||
@ -1837,7 +1836,6 @@ gnc_main_window_update_radio_button (GncMainWindow *window)
|
||||
{
|
||||
GncMainWindowPrivate *priv;
|
||||
GAction *action;
|
||||
GSList *action_list;
|
||||
gsize index;
|
||||
|
||||
ENTER("window %p", window);
|
||||
@ -3409,7 +3407,6 @@ update_menu_model (GncMainWindow *window, const gchar *ui_filename,
|
||||
{
|
||||
GncMainWindowPrivate *priv;
|
||||
GError *error = nullptr;
|
||||
const gchar *resource = GNUCASH_RESOURCE_PREFIX "/";
|
||||
gchar *res_name;
|
||||
GtkBuilder *builder = gtk_builder_new ();
|
||||
GMenuModel *menu_model_part;
|
||||
@ -4057,10 +4054,8 @@ gnc_main_window_setup_window (GncMainWindow *window)
|
||||
GtkWidget *main_vbox;
|
||||
GtkBuilder *builder;
|
||||
GncPluginManager *manager;
|
||||
GtkWidget *extra_item;
|
||||
GList *plugins;
|
||||
GError *error = nullptr;
|
||||
gchar *filename;
|
||||
GAction *action;
|
||||
|
||||
ENTER(" ");
|
||||
@ -4797,7 +4792,6 @@ gnc_main_window_cmd_view_refresh (GSimpleAction *simple,
|
||||
GVariant *parameter,
|
||||
gpointer user_data)
|
||||
{
|
||||
GncMainWindow *window = (GncMainWindow*)user_data;
|
||||
}
|
||||
|
||||
static void
|
||||
@ -4910,7 +4904,6 @@ gnc_main_window_cmd_window_new (GSimpleAction *simple,
|
||||
GVariant *paramter,
|
||||
gpointer user_data)
|
||||
{
|
||||
GncMainWindow *window = (GncMainWindow*)user_data;
|
||||
GncMainWindow *new_window;
|
||||
|
||||
/* Create the new window */
|
||||
@ -4995,7 +4988,6 @@ gnc_main_window_cmd_view_tab_position (GSimpleAction *simple,
|
||||
GVariant *parameter,
|
||||
gpointer user_data)
|
||||
{
|
||||
GncMainWindow *window = (GncMainWindow*)user_data;
|
||||
gint item = g_variant_get_int32 (parameter);
|
||||
|
||||
g_action_change_state (G_ACTION(simple), parameter);
|
||||
|
@ -414,7 +414,6 @@ gnc_history_update_action (GncMainWindow *window,
|
||||
const gchar *filename)
|
||||
{
|
||||
GncMenuModelSearch *gsm = g_new0 (GncMenuModelSearch, 1);
|
||||
GtkWidget *menu_item = NULL;
|
||||
gchar *action_name;
|
||||
gint limit;
|
||||
gboolean add_item = FALSE;
|
||||
|
@ -593,7 +593,6 @@ gnc_query_view_get_selected_entry_list (GNCQueryView *qview)
|
||||
{
|
||||
GtkTreeSelection *selection;
|
||||
acc_data acc_entries;
|
||||
GList *entries = NULL;
|
||||
|
||||
g_return_val_if_fail (qview != NULL, NULL);
|
||||
g_return_val_if_fail (GNC_IS_QUERY_VIEW(qview), NULL);
|
||||
|
@ -635,7 +635,6 @@ row_selected_bus_cb (GtkTreeView *view, GtkTreePath *path,
|
||||
if (gtk_tree_view_get_column (GTK_TREE_VIEW (doclink_dialog->view),
|
||||
DESC_ID - 1) == col)
|
||||
{
|
||||
GncPluginPage *page;
|
||||
InvoiceWindow *iw;
|
||||
|
||||
iw = gnc_ui_invoice_edit (GTK_WINDOW (doclink_dialog->window),
|
||||
|
@ -137,10 +137,8 @@ gnc_ui_new_user_window_present (GtkWindow *window)
|
||||
static void
|
||||
gnc_ui_new_user_dialog_create (GNCNewUserDialog *new_user)
|
||||
{
|
||||
GtkWidget *window;
|
||||
GtkBuilder *builder;
|
||||
GtkWidget *button;
|
||||
gint result;
|
||||
|
||||
ENTER(" ");
|
||||
builder = gtk_builder_new();
|
||||
|
@ -440,7 +440,6 @@ gnc_payment_window_fill_docs_list (PaymentWindow *pw)
|
||||
GtkListStore *store;
|
||||
GtkTreeSelection *selection;
|
||||
GList *list = NULL, *node;
|
||||
GNCLot *tx_lot = NULL;
|
||||
|
||||
g_return_if_fail (pw->docs_list_tree_view && GTK_IS_TREE_VIEW(pw->docs_list_tree_view));
|
||||
|
||||
|
@ -513,8 +513,6 @@ gnc_column_view_edit_size_cb(GtkButton * button, gpointer user_data)
|
||||
GtkWidget * colspin;
|
||||
GtkWidget * dlg;
|
||||
GtkBuilder *builder;
|
||||
SCM current;
|
||||
int length;
|
||||
int dlg_ret;
|
||||
|
||||
builder = gtk_builder_new();
|
||||
|
@ -469,7 +469,6 @@ gnc_main_window_cmd_actions_scheduled_transaction_editor (GSimpleAction *simple,
|
||||
GVariant *parameter,
|
||||
gpointer user_data)
|
||||
{
|
||||
GncMainWindowActionData *data = user_data;
|
||||
GncPluginPage *page = gnc_plugin_page_sx_list_new ();
|
||||
gnc_main_window_open_page (NULL, page);
|
||||
}
|
||||
@ -537,7 +536,6 @@ gnc_main_window_cmd_actions_mortgage_loan (GSimpleAction *simple,
|
||||
GVariant *parameter,
|
||||
gpointer user_data)
|
||||
{
|
||||
GncMainWindowActionData *data = user_data;
|
||||
gnc_ui_sx_loan_assistant_create ();
|
||||
}
|
||||
#ifdef CLOSE_BOOKS_ACTUALLY_WORKS
|
||||
|
@ -701,7 +701,6 @@ gnc_plugin_business_cmd_test_search (GSimpleAction *simple,
|
||||
GVariant *parameter,
|
||||
gpointer user_data)
|
||||
{
|
||||
GncMainWindowActionData *mw = user_data;
|
||||
gnc_search_dialog_test();
|
||||
}
|
||||
|
||||
|
@ -1035,7 +1035,6 @@ gnc_plugin_page_account_tree_cmd_file_new_hierarchy (GSimpleAction *simple,
|
||||
GVariant *paramter,
|
||||
gpointer user_data)
|
||||
{
|
||||
GncPluginPageAccountTree *page = user_data;
|
||||
gnc_ui_hierarchy_assistant(FALSE);
|
||||
}
|
||||
|
||||
@ -1506,7 +1505,6 @@ gnc_plugin_page_account_tree_cmd_delete_account (GSimpleAction *simple,
|
||||
Adopters adopt;
|
||||
GList* list;
|
||||
gint response;
|
||||
GList *filter = NULL;
|
||||
GtkWidget *dialog = NULL;
|
||||
|
||||
if (account == NULL)
|
||||
|
@ -1159,7 +1159,7 @@ gnc_plugin_page_budget_cmd_allperiods_budget (GSimpleAction *simple,
|
||||
GncPluginPageBudget *page = user_data;
|
||||
GncPluginPageBudgetPrivate *priv;
|
||||
GtkTreeSelection *sel;
|
||||
GtkWidget *dialog, *gde, *val, *dtr, *add, *mult;
|
||||
GtkWidget *dialog, *val, *dtr, *add, *mult;
|
||||
gint result;
|
||||
GtkBuilder *builder;
|
||||
const gchar *txt;
|
||||
|
@ -497,7 +497,6 @@ gnc_plugin_page_invoice_update_menus (GncPluginPage *page, gboolean is_posted, g
|
||||
GncPluginPageInvoicePrivate *priv;
|
||||
GncInvoiceType invoice_type;
|
||||
GncInvoice *invoice;
|
||||
gint i, j;
|
||||
action_toolbar_labels *label_list;
|
||||
action_toolbar_labels *label_layout_list;
|
||||
gboolean has_uri = FALSE;
|
||||
@ -1049,7 +1048,6 @@ gnc_plugin_page_invoice_cmd_sort_changed (GSimpleAction *simple,
|
||||
gpointer user_data)
|
||||
{
|
||||
GncPluginPageInvoicePrivate *priv;
|
||||
invoice_sort_type_t value;
|
||||
GncPluginPageInvoice *plugin_page = user_data;
|
||||
gint item;
|
||||
|
||||
@ -1218,7 +1216,6 @@ gnc_plugin_page_invoice_cmd_save_layout (GSimpleAction *simple,
|
||||
{
|
||||
GncPluginPageInvoice *plugin_page = user_data;
|
||||
GncPluginPageInvoicePrivate *priv;
|
||||
GtkWindow *parent;
|
||||
GAction *layout_action;
|
||||
|
||||
g_return_if_fail (GNC_IS_PLUGIN_PAGE_INVOICE(plugin_page));
|
||||
@ -1241,7 +1238,6 @@ gnc_plugin_page_invoice_cmd_reset_layout (GSimpleAction *simple,
|
||||
{
|
||||
GncPluginPageInvoice *plugin_page = user_data;
|
||||
GncPluginPageInvoicePrivate *priv;
|
||||
GtkWindow *parent;
|
||||
GAction *layout_action;
|
||||
|
||||
g_return_if_fail (GNC_IS_PLUGIN_PAGE_INVOICE(plugin_page));
|
||||
|
@ -247,34 +247,12 @@ typedef struct
|
||||
GncOwnerType owner_type;
|
||||
} action_owners_struct;
|
||||
|
||||
static action_owners_struct action_owners[] =
|
||||
{
|
||||
{ "OTEditVendorAction", GNC_OWNER_VENDOR },
|
||||
{ "OTEditCustomerAction", GNC_OWNER_CUSTOMER },
|
||||
{ "OTEditEmployeeAction", GNC_OWNER_EMPLOYEE },
|
||||
{ "OTNewVendorAction", GNC_OWNER_VENDOR },
|
||||
{ "OTNewCustomerAction", GNC_OWNER_CUSTOMER },
|
||||
{ "OTNewEmployeeAction", GNC_OWNER_EMPLOYEE },
|
||||
{ "OTNewBillAction", GNC_OWNER_VENDOR },
|
||||
{ "OTNewInvoiceAction", GNC_OWNER_CUSTOMER },
|
||||
{ "OTNewVoucherAction", GNC_OWNER_EMPLOYEE },
|
||||
{ "OTVendorListingReportAction", GNC_OWNER_VENDOR },
|
||||
{ "OTCustomerListingReportAction", GNC_OWNER_CUSTOMER },
|
||||
{ "OTVendorReportAction", GNC_OWNER_VENDOR },
|
||||
{ "OTCustomerReportAction", GNC_OWNER_CUSTOMER },
|
||||
{ "OTEmployeeReportAction", GNC_OWNER_EMPLOYEE },
|
||||
{ NULL, GNC_OWNER_NONE },
|
||||
};
|
||||
|
||||
GncPluginPage *
|
||||
gnc_plugin_page_owner_tree_new (GncOwnerType owner_type)
|
||||
{
|
||||
GncPluginPageOwnerTree *plugin_page;
|
||||
GncPluginPageOwnerTreePrivate *priv;
|
||||
const GList *item;
|
||||
GSimpleActionGroup *simple_action_group;
|
||||
GAction *action;
|
||||
gint i;
|
||||
|
||||
g_return_val_if_fail( (owner_type != GNC_OWNER_UNDEFINED)
|
||||
&& (owner_type != GNC_OWNER_NONE), NULL);
|
||||
|
@ -383,16 +383,6 @@ static const gchar* actions_requiring_account[] =
|
||||
NULL
|
||||
};
|
||||
|
||||
/** View Style actions */
|
||||
static const gchar* view_style_actions[] =
|
||||
{
|
||||
"ViewStyleBasicAction",
|
||||
"ViewStyleAutoSplitAction",
|
||||
"ViewStyleJournalAction",
|
||||
"ViewStyleRadioAction",
|
||||
NULL
|
||||
};
|
||||
|
||||
static const gchar* actions_requiring_priced_account[] =
|
||||
{
|
||||
"ActionsStockAssistantAction",
|
||||
@ -1035,7 +1025,6 @@ gnc_plugin_page_register_ui_update (gpointer various,
|
||||
/* Modifying action descriptions based on cursor class */
|
||||
{
|
||||
GncMenuModelSearch *gsm = g_new0 (GncMenuModelSearch, 1);
|
||||
GtkWidget *menu_item = NULL;
|
||||
gboolean found = FALSE;
|
||||
const char** iter, **label_iter, **tooltip_iter;
|
||||
gboolean curr_label_trans = FALSE;
|
||||
@ -1112,7 +1101,6 @@ gnc_plugin_page_register_ui_initial_state (GncPluginPageRegister* page)
|
||||
Account* account;
|
||||
SplitRegister* reg;
|
||||
GNCLedgerDisplayType ledger_type;
|
||||
int i;
|
||||
gboolean is_readwrite = !qof_book_is_readonly (gnc_get_current_book());
|
||||
|
||||
priv = GNC_PLUGIN_PAGE_REGISTER_GET_PRIVATE (page);
|
||||
@ -4961,7 +4949,6 @@ gnc_plugin_page_register_cmd_scrub_current (GSimpleAction *simple,
|
||||
GncPluginPageRegister* page = user_data;
|
||||
GncPluginPageRegisterPrivate* priv;
|
||||
Query* query;
|
||||
Split* split;
|
||||
SplitRegister* reg;
|
||||
|
||||
g_return_if_fail (GNC_IS_PLUGIN_PAGE_REGISTER (page));
|
||||
|
@ -501,7 +501,6 @@ gnc_plugin_page_report_create_widget( GncPluginPage *page )
|
||||
GncPluginPageReport *report;
|
||||
GncPluginPageReportPrivate *priv;
|
||||
GtkWindow *topLvl;
|
||||
GAction *action;
|
||||
GtkWidget *webview;
|
||||
URLType type;
|
||||
char * id_name;
|
||||
|
@ -411,7 +411,6 @@ static void
|
||||
gsr_move_sort_and_filter_to_state_file (GNCSplitReg *gsr, GKeyFile* state_file, const gchar *state_section)
|
||||
{
|
||||
GNCLedgerDisplayType ledger_type;
|
||||
GNCLedgerDisplay* ld;
|
||||
|
||||
// Look for any old kvp entries and add them to .gcm file
|
||||
ledger_type = gnc_ledger_display_type (gsr->ledger);
|
||||
@ -1368,7 +1367,6 @@ gsr_default_doclink_remove_handler (GNCSplitReg *gsr)
|
||||
static void
|
||||
gsr_default_doclink_from_sheet_handler (GNCSplitReg *gsr)
|
||||
{
|
||||
CursorClass cursor_class;
|
||||
SplitRegister *reg = gnc_ledger_display_get_split_register (gsr->ledger);
|
||||
Transaction *trans;
|
||||
Split *split;
|
||||
@ -2452,7 +2450,6 @@ gtk_callback_bug_workaround (gpointer argp)
|
||||
GNCLedgerDisplayType ledger_type = gnc_ledger_display_type (args->gsr->ledger);
|
||||
Account *acc = gnc_ledger_display_leader (args->gsr->ledger);
|
||||
const gchar *acc_name = NULL;
|
||||
gchar *tmp = NULL;
|
||||
|
||||
if (acc)
|
||||
{
|
||||
|
@ -1378,7 +1378,7 @@ gnc_ui_reconcile_window_delete_cb (GSimpleAction *simple,
|
||||
{
|
||||
RecnWindow *recnData = user_data;
|
||||
Transaction *trans;
|
||||
Split *split, *next_split;
|
||||
Split *split;
|
||||
|
||||
split = gnc_reconcile_window_get_current_split(recnData);
|
||||
/* This should never be true, but be paranoid */
|
||||
|
@ -299,7 +299,6 @@ static void delete_account_match(ABInitialInfo *info, RevLookupData *data)
|
||||
static void
|
||||
delete_selected_match_cb(gpointer data, gpointer user_data)
|
||||
{
|
||||
GNC_AB_ACCOUNT_SPEC *ab_acc = NULL;
|
||||
GtkTreeIter iter;
|
||||
GtkTreeModel *model = NULL;
|
||||
RevLookupData revLookupData = {NULL, NULL};
|
||||
@ -469,7 +468,7 @@ ab_account_longname(const GNC_AB_ACCOUNT_SPEC *ab_acc)
|
||||
{
|
||||
gchar *bankname = NULL;
|
||||
gchar *result = NULL;
|
||||
const char *ab_bankname, *bankcode, *subAccountId, *account_number;
|
||||
const char *bankcode, *subAccountId, *account_number;
|
||||
|
||||
g_return_val_if_fail(ab_acc, NULL);
|
||||
|
||||
|
@ -903,8 +903,7 @@ gnc_ab_trans_dialog_templ_list_row_activated_cb(GtkTreeView *view,
|
||||
const gchar *new_bankcode;
|
||||
const gchar *new_purpose;
|
||||
const gchar *new_purpose_cont;
|
||||
const gchar *old_amount_text;
|
||||
gnc_numeric old_amount, new_amount;
|
||||
gnc_numeric new_amount;
|
||||
|
||||
g_return_if_fail(td);
|
||||
|
||||
|
@ -47,7 +47,6 @@ void
|
||||
gnc_ab_getbalance(GtkWidget *parent, Account *gnc_acc)
|
||||
{
|
||||
AB_BANKING *api;
|
||||
gboolean online = FALSE;
|
||||
GNC_AB_ACCOUNT_SPEC *ab_acc;
|
||||
GNC_AB_JOB *job = NULL;
|
||||
GNC_AB_JOB_LIST2 *job_list = NULL;
|
||||
|
@ -97,7 +97,6 @@ void
|
||||
gnc_ab_gettrans(GtkWidget *parent, Account *gnc_acc)
|
||||
{
|
||||
AB_BANKING *api;
|
||||
gboolean online = FALSE;
|
||||
GNC_AB_ACCOUNT_SPEC *ab_acc;
|
||||
GWEN_TIME *from_date = NULL, *to_date = NULL;
|
||||
time64 until;
|
||||
|
@ -81,7 +81,6 @@ gnc_ab_maketrans(GtkWidget *parent, Account *gnc_acc,
|
||||
GncABTransType trans_type)
|
||||
{
|
||||
AB_BANKING *api;
|
||||
gboolean online = FALSE;
|
||||
GNC_AB_ACCOUNT_SPEC *ab_acc;
|
||||
GList *templates = NULL;
|
||||
GncABTransDialog *td = NULL;
|
||||
|
@ -498,7 +498,7 @@ gnc_ab_trans_to_gnc (const AB_TRANSACTION *ab_trans, Account *gnc_acc)
|
||||
Transaction *gnc_trans;
|
||||
const gchar *fitid;
|
||||
const GNC_GWEN_DATE *value_date, *post_date;
|
||||
time64 current_time, post_time;
|
||||
time64 post_time;
|
||||
const char *custref;
|
||||
gchar *description;
|
||||
Split *split;
|
||||
|
@ -1565,7 +1565,7 @@ checkcert_cb(GWEN_GUI *gwen_gui, const GWEN_SSLCERTDESCR *cert,
|
||||
const gchar *hash, *status;
|
||||
GChecksum *gcheck = g_checksum_new (G_CHECKSUM_MD5);
|
||||
gchar cert_hash[16];
|
||||
gint retval, i;
|
||||
gint retval;
|
||||
gsize hashlen = 0;
|
||||
|
||||
g_return_val_if_fail(gui && gui->accepted_certs, -1);
|
||||
|
@ -605,7 +605,6 @@ gnc_plugin_ab_cmd_view_logwindow (GSimpleAction *simple,
|
||||
GVariant *parameter,
|
||||
gpointer user_data)
|
||||
{
|
||||
GncMainWindowActionData *data = user_data;
|
||||
GVariant *state;
|
||||
|
||||
state = g_action_get_state (G_ACTION(simple));
|
||||
|
@ -852,7 +852,6 @@ static GtkWidget *
|
||||
csv_export_assistant_create (CsvExportInfo *info)
|
||||
{
|
||||
GtkBuilder *builder;
|
||||
GtkWidget *h_box;
|
||||
GtkWidget *button;
|
||||
GtkWidget *table, *hbox;
|
||||
|
||||
|
@ -562,7 +562,6 @@ static GtkWidget *
|
||||
csv_import_assistant_create (CsvImportInfo *info)
|
||||
{
|
||||
GtkBuilder *builder;
|
||||
GtkWidget *button;
|
||||
GtkCellRenderer *renderer;
|
||||
GtkTreeViewColumn *column;
|
||||
gchar *mnemonic_desc = NULL;
|
||||
|
@ -543,7 +543,6 @@ void GncPreSplit::add (GncTransPropType prop_type, const std::string& value)
|
||||
// Drop any existing error for the prop_type we're about to add to
|
||||
m_errors.erase(prop_type);
|
||||
|
||||
Account *acct = nullptr;
|
||||
auto num_val = GncNumeric();
|
||||
switch (prop_type)
|
||||
{
|
||||
|
@ -246,7 +246,6 @@ gnc_gen_trans_list_empty (GNCImportMainMatcher *info)
|
||||
{
|
||||
GtkTreeModel *model;
|
||||
GtkTreeIter iter;
|
||||
GNCImportTransInfo *trans_info;
|
||||
g_assert (info);
|
||||
model = gtk_tree_view_get_model (info->view);
|
||||
// Check that both the tree model and the temporary list are empty.
|
||||
@ -258,7 +257,6 @@ gnc_gen_trans_list_show_accounts_column (GNCImportMainMatcher *info)
|
||||
{
|
||||
GtkTreeModel *model;
|
||||
GtkTreeIter iter;
|
||||
GNCImportTransInfo *trans_info;
|
||||
gboolean multiple_accounts = FALSE;
|
||||
gboolean valid;
|
||||
|
||||
@ -539,7 +537,6 @@ on_matcher_ok_clicked (GtkButton *button, GNCImportMainMatcher *info)
|
||||
GNCImportTransInfo *trans_info;
|
||||
gboolean append_text = gtk_toggle_button_get_active ((GtkToggleButton*) info->append_text);
|
||||
gboolean first_tran = TRUE;
|
||||
gpointer user_data = info->user_data;
|
||||
|
||||
g_assert (info);
|
||||
|
||||
@ -879,8 +876,6 @@ gnc_gen_trans_assign_transfer_account_to_selection_cb (GtkMenuItem *menuitem,
|
||||
GtkTreeView *treeview;
|
||||
GtkTreeSelection *selection;
|
||||
GtkTreeModel *model;
|
||||
GtkTreeIter iter;
|
||||
GNCImportTransInfo *trans_info;
|
||||
Account *assigned_account;
|
||||
GList *selected_rows, *l;
|
||||
gboolean first, is_selection;
|
||||
@ -1050,7 +1045,7 @@ static gboolean
|
||||
input_new_fields (GNCImportMainMatcher *info, RowInfo *rowinfo,
|
||||
char **new_desc, char **new_notes, char **new_memo)
|
||||
{
|
||||
GtkWidget *desc_entry, *notes_entry, *memo_entry, *label;
|
||||
GtkWidget *desc_entry, *notes_entry, *memo_entry;
|
||||
GtkWidget *dialog;
|
||||
GtkBuilder *builder;
|
||||
gboolean retval = FALSE;
|
||||
@ -1184,7 +1179,7 @@ gnc_gen_trans_reset_edits_cb (GtkMenuItem *menuitem, GNCImportMainMatcher *info)
|
||||
GtkTreeModel *model;
|
||||
GtkTreeStore *store;
|
||||
GtkTreeSelection *selection;
|
||||
GList *selected_rows, *row_info_list;
|
||||
GList *selected_rows;
|
||||
|
||||
g_return_if_fail (info != NULL);
|
||||
ENTER("gnc_gen_trans_reset_edits_cb");
|
||||
|
@ -76,12 +76,6 @@ enum matcher_cols
|
||||
/* Needs to be commented in again if any DEBUG() macro is used here. */
|
||||
/*static short module = MOD_IMPORT;*/
|
||||
|
||||
/********************************************************************\
|
||||
* Constants, should idealy be defined a user preference dialog *
|
||||
\********************************************************************/
|
||||
|
||||
static const int SHOW_NUMERIC_SCORE = FALSE;
|
||||
|
||||
/********************************************************************\
|
||||
* Structures passed between the functions *
|
||||
\********************************************************************/
|
||||
|
@ -244,8 +244,6 @@ int ofx_proc_security_cb(const struct OfxSecurityData data, void * security_user
|
||||
char* default_fullname = NULL;
|
||||
char* default_mnemonic = NULL;
|
||||
|
||||
ofx_info* info = (ofx_info*) security_user_data;
|
||||
|
||||
if (data.unique_id_valid)
|
||||
{
|
||||
cusip = gnc_utf8_strip_invalid_strdup (data.unique_id);
|
||||
@ -703,7 +701,6 @@ choose_investment_account(OfxTransactionData *data, ofx_info *info,
|
||||
gnc_commodity *commodity)
|
||||
{
|
||||
Account* investment_account = NULL;
|
||||
gnc_numeric gnc_amount, gnc_units;
|
||||
InvestmentAcctData inv_data = {commodity, NULL, NULL, TRUE};
|
||||
|
||||
// As we now have the commodity, select the account with that commodity.
|
||||
@ -1295,7 +1292,6 @@ runMatcher (ofx_info* info, char * selected_filename, gboolean go_to_next_file)
|
||||
{
|
||||
GtkWindow *parent = info->parent;
|
||||
GList* trans_list_remain = NULL;
|
||||
Account* first_account = NULL;
|
||||
|
||||
/* If we have multiple accounts in the ofx file, we need to
|
||||
* avoid processing transfers between accounts together because this will
|
||||
@ -1441,7 +1437,6 @@ void gnc_file_ofx_import (GtkWindow *parent)
|
||||
GSList* selected_filenames = NULL;
|
||||
char *default_dir;
|
||||
GList *filters = NULL;
|
||||
GSList* iter = NULL;
|
||||
ofx_info* info = NULL;
|
||||
GtkFileFilter* filter = gtk_file_filter_new ();
|
||||
|
||||
|
@ -2714,7 +2714,6 @@ gnc_ui_qif_import_commodity_notebook_update_combos (QIFImportWindow * wind, gboo
|
||||
GList *pageptr;
|
||||
GtkWidget *notebook_page;
|
||||
QIFCommNotebookPage *comm_nb_page;
|
||||
gboolean pages_complete = TRUE;
|
||||
|
||||
for (pageptr = wind->commodity_notebook_pages; pageptr; pageptr = pageptr->next)
|
||||
{
|
||||
|
@ -174,7 +174,6 @@ protected:
|
||||
//! Test for function gnc_import_TransInfo_new()
|
||||
TEST_F(ImportBackendTest, CreateTransInfo)
|
||||
{
|
||||
gchar* online_id;
|
||||
|
||||
using namespace testing;
|
||||
|
||||
|
@ -252,9 +252,6 @@ SplitList *gnc_float_txn_get_splits (const FloatingTxn *ft)
|
||||
|
||||
FloatingSplit *gnc_float_txn_get_float_split (const FloatingTxn *ft, guint index)
|
||||
{
|
||||
FloatingSplit *fs = NULL;
|
||||
guint size = 0;
|
||||
|
||||
g_return_val_if_fail (ft, NULL);
|
||||
g_return_val_if_fail (ft->m_splits, NULL);
|
||||
g_return_val_if_fail (index < g_list_length (ft->m_splits) , NULL);
|
||||
@ -263,7 +260,7 @@ FloatingSplit *gnc_float_txn_get_float_split (const FloatingTxn *ft, guint index
|
||||
|
||||
FloatingSplit *gnc_float_txn_get_other_float_split (const FloatingTxn *ft, FloatingSplit *fs)
|
||||
{
|
||||
guint size = 0, other = 0;
|
||||
guint other = 0;
|
||||
|
||||
g_return_val_if_fail (ft, NULL);
|
||||
g_return_val_if_fail (ft->m_splits, NULL);
|
||||
|
@ -1873,7 +1873,6 @@ gnc_split_register_get_debcred_entry (VirtualLocation virt_loc,
|
||||
}
|
||||
else
|
||||
{
|
||||
gboolean currency_match;
|
||||
switch (reg->type)
|
||||
{
|
||||
case STOCK_REGISTER:
|
||||
|
@ -1009,7 +1009,6 @@ gnc_split_register_paste_current (SplitRegister* reg)
|
||||
"Are you sure you want to do that?");
|
||||
Account * copied_leader;
|
||||
Account * default_account;
|
||||
const GncGUID *new_guid;
|
||||
int trans_split_index;
|
||||
int split_index;
|
||||
int num_splits;
|
||||
|
@ -362,7 +362,7 @@ test_gnc_txn_to_float_txn (Fixture *fixture, gconstpointer pData)
|
||||
{
|
||||
FloatingTxn *ft = NULL;
|
||||
SplitList *sl = xaccTransGetSplitList(fixture->txn), *siter;
|
||||
SplitList *fsl, *fsiter;
|
||||
SplitList *fsiter;
|
||||
FloatingSplit *fs;
|
||||
Split *s;
|
||||
|
||||
@ -419,7 +419,7 @@ test_gnc_txn_to_float_txn_cut_semantics (Fixture *fixture, gconstpointer pData)
|
||||
{
|
||||
FloatingTxn *ft = NULL;
|
||||
SplitList *sl = xaccTransGetSplitList(fixture->txn), *siter;
|
||||
SplitList *fsl, *fsiter;
|
||||
SplitList *fsiter;
|
||||
FloatingSplit *fs;
|
||||
Split *s;
|
||||
|
||||
@ -536,7 +536,6 @@ test_gnc_float_txn_to_txn_swap_accounts (FlFixture *fixture, gconstpointer pData
|
||||
Account *exp_acct1 = fixture->acc1, *exp_acct2 = fixture->acc2;
|
||||
SplitList *siter;
|
||||
Split *s;
|
||||
gnc_numeric amt;
|
||||
|
||||
if (prefs->swap_accts)
|
||||
{
|
||||
|
@ -332,8 +332,6 @@ gnc_combo_cell_destroy (BasicCell* bcell)
|
||||
|
||||
if (box != NULL)
|
||||
{
|
||||
GList* node;
|
||||
|
||||
/* Don't destroy the qf if its not ours to destroy */
|
||||
if (FALSE == box->use_quickfill_cache)
|
||||
{
|
||||
|
@ -121,7 +121,6 @@ gnc_header_draw_offscreen (GncHeader *header)
|
||||
for (j = 0; j < style->ncols; j++)
|
||||
{
|
||||
CellDimensions *cd;
|
||||
double text_x, text_y, text_w, text_h;
|
||||
BasicCell *cell;
|
||||
const char *text;
|
||||
int width;
|
||||
|
@ -561,7 +561,6 @@ draw_background_cb (GtkWidget *widget, cairo_t *cr, gpointer user_data)
|
||||
static void
|
||||
preedit_changed_cb (GtkEntry* entry, gchar *preedit, GncItemEdit* item_edit)
|
||||
{
|
||||
int pos, bound;
|
||||
item_edit->preedit_length = g_utf8_strlen (preedit, -1); // Note codepoints not bytes
|
||||
DEBUG("%s %lu", preedit, item_edit->preedit_length);
|
||||
}
|
||||
@ -1032,7 +1031,7 @@ gnc_item_edit_show_popup (GncItemEdit *item_edit)
|
||||
gint popup_x, popup_y;
|
||||
gint popup_w = -1, popup_h = -1;
|
||||
gint popup_max_width, popup_max_height;
|
||||
gint view_width, view_height;
|
||||
gint view_height;
|
||||
gint down_height, up_height;
|
||||
gint sheet_width;
|
||||
|
||||
|
@ -552,7 +552,6 @@ gnucash_register_create_widget (Table *table)
|
||||
GtkWidget *widget;
|
||||
GtkWidget *sheet;
|
||||
GtkWidget *scrollbar;
|
||||
GtkWidget *box;
|
||||
|
||||
reg = g_object_new (GNUCASH_TYPE_REGISTER, NULL);
|
||||
widget = GTK_WIDGET(reg);
|
||||
|
@ -421,7 +421,6 @@ gnucash_sheet_activate_cursor_cell (GnucashSheet *sheet,
|
||||
GdkRectangle rect;
|
||||
gint x, y, width, height;
|
||||
gint index = 0, trailing = 0;
|
||||
gboolean result;
|
||||
gint x_offset = 0;
|
||||
|
||||
if (text && *text)
|
||||
@ -1811,7 +1810,6 @@ gnucash_sheet_key_press_event_internal (GtkWidget *widget, GdkEventKey *event)
|
||||
VirtualLocation cur_virt_loc;
|
||||
VirtualLocation new_virt_loc;
|
||||
gncTableTraversalDir direction = 0;
|
||||
int distance;
|
||||
GdkModifierType modifiers = gtk_accelerator_get_default_mod_mask ();
|
||||
|
||||
g_return_val_if_fail (widget != NULL, TRUE);
|
||||
@ -1917,8 +1915,6 @@ gnucash_sheet_key_press_event (GtkWidget *widget, GdkEventKey *event)
|
||||
static gint
|
||||
gnucash_sheet_key_release_event (GtkWidget *widget, GdkEventKey *event)
|
||||
{
|
||||
GnucashSheet *sheet;
|
||||
|
||||
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);
|
||||
|
@ -320,7 +320,6 @@ set_dimensions_pass_two (GnucashSheet *sheet, int default_width)
|
||||
BasicCell *cell;
|
||||
const char *text;
|
||||
int sample_width;
|
||||
int old_width;
|
||||
PangoLayout *layout;
|
||||
|
||||
cell = gnc_cellblock_get_cell (cursor, 0, col);
|
||||
|
@ -48,7 +48,6 @@ namespace bpt = boost::property_tree;
|
||||
#define NOTIFY_TAG "%s-%s-notify_id"
|
||||
|
||||
static GHashTable *schema_hash = NULL;
|
||||
static const gchar *gsettings_prefix;
|
||||
|
||||
static GHashTable *registered_handlers_hash = NULL;
|
||||
|
||||
|
@ -1271,7 +1271,7 @@ static gboolean
|
||||
create_each_transaction_helper(Transaction *template_txn, void *user_data)
|
||||
{
|
||||
Transaction *new_txn;
|
||||
GList *txn_splits, *template_splits, *node;
|
||||
GList *txn_splits, *template_splits;
|
||||
Split *copying_split;
|
||||
SxTxnCreationData *creation_data = (SxTxnCreationData*)user_data;
|
||||
SchedXaction *sx = creation_data->instance->parent->sx;
|
||||
|
@ -278,7 +278,6 @@ gnc_ui_account_is_higher_balance_limit_reached (const Account *account,
|
||||
gnc_numeric balance_limit;
|
||||
gboolean limit_valid = FALSE;
|
||||
gboolean retval = FALSE;
|
||||
gint compare_result;
|
||||
|
||||
g_return_val_if_fail (GNC_IS_ACCOUNT(account), FALSE);
|
||||
|
||||
@ -306,7 +305,6 @@ gnc_ui_account_is_lower_balance_limit_reached (const Account *account,
|
||||
gnc_numeric balance_limit;
|
||||
gboolean limit_valid = FALSE;
|
||||
gboolean retval = FALSE;
|
||||
gint compare_result;
|
||||
|
||||
g_return_val_if_fail (GNC_IS_ACCOUNT(account), FALSE);
|
||||
|
||||
|
@ -205,7 +205,6 @@ GncDbiBackend<Type>::set_standard_connection_options (dbi_conn conn,
|
||||
const UriStrings& uri)
|
||||
|
||||
{
|
||||
gint result;
|
||||
PairVec options;
|
||||
options.push_back(std::make_pair("host", uri.m_host));
|
||||
options.push_back(std::make_pair("dbname", uri.m_dbname));
|
||||
@ -638,7 +637,6 @@ template <DbType Type> void
|
||||
GncDbiBackend<Type>::session_begin (QofSession* session, const char* new_uri,
|
||||
SessionOpenMode mode)
|
||||
{
|
||||
GncDbiTestResult dbi_test_result = GNC_DBI_PASS;
|
||||
PairVec options;
|
||||
|
||||
g_return_if_fail (session != nullptr);
|
||||
|
@ -540,7 +540,6 @@ GncDbiSqlConnection::quote_string (const std::string& unquoted_str)
|
||||
const noexcept
|
||||
{
|
||||
char* quoted_str;
|
||||
size_t size;
|
||||
|
||||
dbi_conn_quote_string_copy (m_conn, unquoted_str.c_str(),
|
||||
"ed_str);
|
||||
|
@ -246,7 +246,6 @@ destroy_database (gchar* url)
|
||||
gchar* dbname = NULL;
|
||||
gchar* username = NULL;
|
||||
gchar* password = NULL;
|
||||
gchar* basename = NULL;
|
||||
gint portnum = 0;
|
||||
gchar* port = NULL;
|
||||
auto pgsql = "pgsql";
|
||||
|
@ -77,9 +77,6 @@ GncSqlColumnTableEntryImpl<CT_ADDRESS>::load (const GncSqlBackend* sql_be,
|
||||
QofIdTypeConst obj_name,
|
||||
gpointer pObject) const noexcept
|
||||
{
|
||||
const gchar* s;
|
||||
|
||||
|
||||
g_return_if_fail (sql_be != NULL);
|
||||
g_return_if_fail (pObject != NULL);
|
||||
|
||||
|
@ -398,7 +398,6 @@ void
|
||||
GncSqlRecurrenceBackend::create_tables (GncSqlBackend* sql_be)
|
||||
{
|
||||
gint version;
|
||||
gboolean ok;
|
||||
|
||||
g_return_if_fail (sql_be != NULL);
|
||||
|
||||
|
@ -514,7 +514,6 @@ static void
|
||||
set_numeric_val (gpointer pObject, gnc_numeric value)
|
||||
{
|
||||
slot_info_t* pInfo = (slot_info_t*)pObject;
|
||||
KvpValue* pValue = NULL;
|
||||
|
||||
g_return_if_fail (pObject != NULL);
|
||||
|
||||
@ -545,7 +544,6 @@ static void
|
||||
set_gdate_val (gpointer pObject, GDate* value)
|
||||
{
|
||||
slot_info_t* pInfo = (slot_info_t*)pObject;
|
||||
KvpValue* pValue = NULL;
|
||||
|
||||
g_return_if_fail (pObject != NULL);
|
||||
|
||||
|
@ -565,7 +565,6 @@ GncSqlBackend::get_object_backend(const std::string& type) const noexcept
|
||||
void
|
||||
GncSqlBackend::commit (QofInstance* inst)
|
||||
{
|
||||
sql_backend be_data;
|
||||
gboolean is_dirty;
|
||||
gboolean is_destroying;
|
||||
gboolean is_infant;
|
||||
@ -821,7 +820,6 @@ bool
|
||||
GncSqlBackend::object_in_db (const char* table_name, QofIdTypeConst obj_name,
|
||||
const gpointer pObject, const EntryVec& table) const noexcept
|
||||
{
|
||||
guint count;
|
||||
g_return_val_if_fail (table_name != nullptr, false);
|
||||
g_return_val_if_fail (obj_name != nullptr, false);
|
||||
g_return_val_if_fail (pObject != nullptr, false);
|
||||
|
@ -323,7 +323,6 @@ GncSqlColumnTableEntryImpl<CT_GUID>::load (const GncSqlBackend* sql_be,
|
||||
{
|
||||
|
||||
GncGUID guid;
|
||||
const GncGUID* pGuid;
|
||||
|
||||
g_return_if_fail (pObject != NULL);
|
||||
g_return_if_fail (m_gobj_param_name != nullptr || get_setter(obj_name) != nullptr);
|
||||
|
@ -204,7 +204,6 @@ load_single_split (GncSqlBackend* sql_be, GncSqlRow& row)
|
||||
const GncGUID* guid;
|
||||
GncGUID split_guid;
|
||||
Split* pSplit = NULL;
|
||||
gboolean bad_guid = FALSE;
|
||||
|
||||
g_return_val_if_fail (sql_be != NULL, NULL);
|
||||
|
||||
@ -689,8 +688,6 @@ void gnc_sql_transaction_load_tx_for_account (GncSqlBackend* sql_be,
|
||||
Account* account)
|
||||
{
|
||||
const GncGUID* guid;
|
||||
gchar guid_buf[GUID_ENCODING_LENGTH + 1];
|
||||
gchar* query_sql;
|
||||
|
||||
g_return_if_fail (sql_be != NULL);
|
||||
g_return_if_fail (account != NULL);
|
||||
@ -954,8 +951,6 @@ GncSqlColumnTableEntryImpl<CT_TXREF>::load (const GncSqlBackend* sql_be,
|
||||
QofIdTypeConst obj_name,
|
||||
gpointer pObject) const noexcept
|
||||
{
|
||||
const gchar* guid_str;
|
||||
|
||||
g_return_if_fail (sql_be != NULL);
|
||||
g_return_if_fail (pObject != NULL);
|
||||
|
||||
|
@ -761,8 +761,6 @@ kvp_frame_slot_end_handler (gpointer data_for_children,
|
||||
gpointer* result, const gchar* tag)
|
||||
{
|
||||
KvpFrame* f = (KvpFrame*) parent_data;
|
||||
GSList* lp;
|
||||
gboolean first = TRUE;
|
||||
gchar* key = NULL;
|
||||
KvpValue* value = NULL;
|
||||
gboolean delete_value = FALSE;
|
||||
|
@ -83,10 +83,6 @@
|
||||
|
||||
static QofLogModule log_module = GNC_MOD_IO;
|
||||
|
||||
/* map pointers, e.g. of type FILE*, to GThreads */
|
||||
static GHashTable* threads = NULL;
|
||||
G_LOCK_DEFINE_STATIC (threads);
|
||||
|
||||
typedef struct
|
||||
{
|
||||
gint fd;
|
||||
|
@ -324,8 +324,6 @@ xmlNodePtr
|
||||
qof_instance_slots_to_dom_tree (const char* tag, const QofInstance* inst)
|
||||
{
|
||||
xmlNodePtr ret;
|
||||
const char** keys;
|
||||
unsigned int i;
|
||||
KvpFrame* frame = qof_instance_get_slots (inst);
|
||||
if (!frame || frame->empty())
|
||||
return nullptr;
|
||||
|
@ -30,7 +30,6 @@ test_kvp_get_slot (int run,
|
||||
}
|
||||
else
|
||||
{
|
||||
gchar* tmp;
|
||||
failure_args (msg, __FILE__, __LINE__, "run=%d", run);
|
||||
printf (" Value is %s\n", test_val2->to_string ().c_str ());
|
||||
}
|
||||
@ -52,7 +51,6 @@ test_kvp_copy_compare (int run,
|
||||
}
|
||||
else
|
||||
{
|
||||
gchar* tmp;
|
||||
failure_args (msg, __FILE__, __LINE__, "run=%d", run);
|
||||
printf ("Frame1 is %s\n", test_frame1->to_string ().c_str ());
|
||||
printf ("Frame2 is %s\n", test_frame2->to_string ().c_str ());
|
||||
@ -75,7 +73,6 @@ test_kvp_copy_get_slot (int run,
|
||||
}
|
||||
else
|
||||
{
|
||||
gchar* tmp;
|
||||
failure_args (msg, __FILE__, __LINE__, "run=%d", run);
|
||||
printf ("Frame1 is %s\n", test_frame1->to_string ().c_str ());
|
||||
printf ("Frame2 is %s\n", test_frame2->to_string ().c_str ());
|
||||
|
@ -584,7 +584,6 @@ get_userconfig_home(void)
|
||||
|
||||
static std::string migrate_gnc_datahome()
|
||||
{
|
||||
auto success = false;
|
||||
// Specify location of dictionaries
|
||||
bfs::path old_dir(g_get_home_dir(), cvt);
|
||||
old_dir /= ".gnucash";
|
||||
|
@ -377,7 +377,6 @@ gnc_account_get_property (GObject *object,
|
||||
{
|
||||
Account *account;
|
||||
AccountPrivate *priv;
|
||||
const gchar *key;
|
||||
|
||||
g_return_if_fail(GNC_IS_ACCOUNT(object));
|
||||
|
||||
@ -2372,9 +2371,7 @@ xaccAccountOrder (const Account *aa, const Account *ab)
|
||||
{
|
||||
AccountPrivate *priv_aa, *priv_ab;
|
||||
const char *da, *db;
|
||||
char *endptr = NULL;
|
||||
int ta, tb, result;
|
||||
long la, lb;
|
||||
|
||||
if ( aa && !ab ) return -1;
|
||||
if ( !aa && ab ) return +1;
|
||||
|
@ -155,7 +155,6 @@ gnc_split_get_property(GObject *object,
|
||||
GParamSpec *pspec)
|
||||
{
|
||||
Split *split;
|
||||
gchar *key;
|
||||
Time64 t;
|
||||
|
||||
g_return_if_fail(GNC_IS_SPLIT(object));
|
||||
@ -229,7 +228,6 @@ gnc_split_set_property(GObject *object,
|
||||
{
|
||||
Split *split;
|
||||
gnc_numeric* number;
|
||||
gchar *key;
|
||||
Time64 *t;
|
||||
g_return_if_fail(GNC_IS_SPLIT(object));
|
||||
|
||||
|
@ -244,7 +244,6 @@ xaccTransWriteLog (Transaction *trans, char flag)
|
||||
|
||||
for (node = trans->splits; node; node = node->next)
|
||||
{
|
||||
time64 time;
|
||||
Split *split = node->data;
|
||||
const char * accname = "";
|
||||
char acc_guid_str[GUID_ENCODING_LENGTH + 1];
|
||||
|
@ -308,7 +308,6 @@ gnc_transaction_get_property(GObject* object,
|
||||
GParamSpec* pspec)
|
||||
{
|
||||
Transaction* tx;
|
||||
gchar *key;
|
||||
Time64 time;
|
||||
|
||||
g_return_if_fail(GNC_IS_TRANSACTION(object));
|
||||
@ -355,7 +354,6 @@ gnc_transaction_set_property(GObject* object,
|
||||
GParamSpec* pspec)
|
||||
{
|
||||
Transaction* tx;
|
||||
gchar *key;
|
||||
Time64 *t;
|
||||
|
||||
g_return_if_fail(GNC_IS_TRANSACTION(object));
|
||||
@ -1940,7 +1938,6 @@ xaccTransOrder_num_action (const Transaction *ta, const char *actna,
|
||||
{
|
||||
const char *da, *db;
|
||||
int retval;
|
||||
int64_t na, nb;
|
||||
|
||||
if ( ta && !tb ) return -1;
|
||||
if ( !ta && tb ) return +1;
|
||||
|
@ -1113,7 +1113,6 @@ gnc_date_timestamp (void)
|
||||
time64
|
||||
gnc_iso8601_to_time64_gmt(const char *cstr)
|
||||
{
|
||||
time64 time;
|
||||
if (!cstr) return INT64_MAX;
|
||||
try
|
||||
{
|
||||
@ -1138,8 +1137,6 @@ gnc_iso8601_to_time64_gmt(const char *cstr)
|
||||
char *
|
||||
gnc_time64_to_iso8601_buff (time64 time, char * buff)
|
||||
{
|
||||
constexpr size_t max_iso_date_length = 32;
|
||||
|
||||
if (! buff) return NULL;
|
||||
try
|
||||
{
|
||||
|
@ -43,9 +43,6 @@
|
||||
#include <gnc-locale-utils.hpp>
|
||||
#include "gnc-timezone.hpp"
|
||||
#include "gnc-datetime.hpp"
|
||||
#include "qoflog.h"
|
||||
|
||||
static const char* log_module = "gnc.engine";
|
||||
|
||||
#define N_(string) string //So that xgettext will find it
|
||||
|
||||
|
@ -697,7 +697,6 @@ div_single_leg (uint64_t* u, size_t m, uint64_t v,
|
||||
GncInt128& q, GncInt128& r) noexcept
|
||||
{
|
||||
uint64_t qv[sublegs] {};
|
||||
uint64_t carry {};
|
||||
bool negative {q.isNeg()};
|
||||
bool rnegative {r.isNeg()};
|
||||
for (int i = m - 1; i >= 0; --i)
|
||||
|
@ -144,7 +144,6 @@ gnc_lot_get_property(GObject* object, guint prop_id, GValue* value, GParamSpec*
|
||||
{
|
||||
GNCLot* lot;
|
||||
GNCLotPrivate* priv;
|
||||
gchar *key;
|
||||
|
||||
g_return_if_fail(GNC_IS_LOT(object));
|
||||
|
||||
@ -181,7 +180,6 @@ gnc_lot_set_property (GObject* object,
|
||||
{
|
||||
GNCLot* lot;
|
||||
GNCLotPrivate* priv;
|
||||
gchar *key = NULL;
|
||||
|
||||
g_return_if_fail(GNC_IS_LOT(object));
|
||||
|
||||
|
@ -656,8 +656,6 @@ gnc_numeric_positive_p(gnc_numeric a)
|
||||
int
|
||||
gnc_numeric_compare(gnc_numeric a, gnc_numeric b)
|
||||
{
|
||||
gint64 aa, bb;
|
||||
|
||||
if (gnc_numeric_check(a) || gnc_numeric_check(b))
|
||||
{
|
||||
return 0;
|
||||
@ -803,7 +801,6 @@ gnc_numeric
|
||||
gnc_numeric_sub(gnc_numeric a, gnc_numeric b,
|
||||
gint64 denom, gint how)
|
||||
{
|
||||
gnc_numeric nb;
|
||||
if (gnc_numeric_check(a) || gnc_numeric_check(b))
|
||||
{
|
||||
return gnc_numeric_error(GNC_ERROR_ARG);
|
||||
|
@ -129,7 +129,6 @@ gnc_customer_get_property (GObject *object,
|
||||
GParamSpec *pspec)
|
||||
{
|
||||
GncCustomer *cust;
|
||||
gchar *key;
|
||||
g_return_if_fail(GNC_IS_CUSTOMER(object));
|
||||
|
||||
cust = GNC_CUSTOMER(object);
|
||||
@ -160,7 +159,6 @@ gnc_customer_set_property (GObject *object,
|
||||
GParamSpec *pspec)
|
||||
{
|
||||
GncCustomer *cust;
|
||||
gchar *key;
|
||||
|
||||
g_return_if_fail(GNC_IS_CUSTOMER(object));
|
||||
|
||||
|
@ -962,7 +962,7 @@ static gnc_numeric gncInvoiceGetNetAndTaxesInternal (GncInvoice *invoice, gboole
|
||||
for (node = gncInvoiceGetEntries (invoice); node; node = node->next)
|
||||
{
|
||||
GncEntry *entry = node->data;
|
||||
gnc_numeric value, tax;
|
||||
gnc_numeric value;
|
||||
|
||||
if (use_payment_type && gncEntryGetBillPayment (entry) != type)
|
||||
continue;
|
||||
@ -1010,7 +1010,6 @@ static gnc_numeric gncInvoiceGetTotalInternal (GncInvoice *invoice, gboolean use
|
||||
{
|
||||
AccountValueList *taxes;
|
||||
gnc_numeric total;
|
||||
int denom;
|
||||
|
||||
if (!invoice) return gnc_numeric_zero ();
|
||||
|
||||
@ -1056,7 +1055,6 @@ gnc_numeric gncInvoiceGetTotalOf (GncInvoice *invoice, GncEntryPaymentType type)
|
||||
|
||||
AccountValueList *gncInvoiceGetTotalTaxList (GncInvoice *invoice)
|
||||
{
|
||||
gnc_numeric unused;
|
||||
AccountValueList *taxes;
|
||||
if (!invoice) return NULL;
|
||||
|
||||
|
@ -109,7 +109,6 @@ gnc_job_get_property (GObject *object,
|
||||
GParamSpec *pspec)
|
||||
{
|
||||
GncJob *job;
|
||||
gchar *key;
|
||||
|
||||
g_return_if_fail(GNC_IS_JOB(object));
|
||||
|
||||
@ -135,7 +134,6 @@ gnc_job_set_property (GObject *object,
|
||||
GParamSpec *pspec)
|
||||
{
|
||||
GncJob *job;
|
||||
gchar *key;
|
||||
|
||||
g_return_if_fail(GNC_IS_JOB(object));
|
||||
|
||||
|
@ -139,7 +139,6 @@ gnc_vendor_get_property (GObject *object,
|
||||
GParamSpec *pspec)
|
||||
{
|
||||
GncVendor *vendor;
|
||||
gchar *key;
|
||||
|
||||
g_return_if_fail(GNC_IS_VENDOR(object));
|
||||
|
||||
@ -201,7 +200,6 @@ gnc_vendor_set_property (GObject *object,
|
||||
GParamSpec *pspec)
|
||||
{
|
||||
GncVendor *vendor;
|
||||
gchar *key;
|
||||
|
||||
g_return_if_fail(GNC_IS_VENDOR(object));
|
||||
|
||||
|
@ -233,7 +233,6 @@ guid_hash_to_guint (gconstpointer ptr)
|
||||
gnc::GUID const & temp {guid};
|
||||
|
||||
guint hash {0};
|
||||
unsigned retspot {0};
|
||||
std::for_each (temp.begin (), temp.end (), [&hash] (unsigned char a) {
|
||||
hash <<=4;
|
||||
hash |= a;
|
||||
|
@ -39,8 +39,6 @@
|
||||
/* This static indicates the debugging module that this .o belongs to. */
|
||||
static QofLogModule log_module = "qof.kvp";
|
||||
|
||||
static const char delim = '/';
|
||||
|
||||
KvpFrameImpl::KvpFrameImpl(const KvpFrameImpl & rhs) noexcept
|
||||
{
|
||||
std::for_each(rhs.m_valuemap.begin(), rhs.m_valuemap.end(),
|
||||
|
@ -158,7 +158,6 @@ qof_book_get_property (GObject* object,
|
||||
GParamSpec* pspec)
|
||||
{
|
||||
QofBook *book;
|
||||
gchar *key;
|
||||
|
||||
g_return_if_fail (QOF_IS_BOOK (object));
|
||||
book = QOF_BOOK (object);
|
||||
@ -199,7 +198,6 @@ qof_book_set_property (GObject *object,
|
||||
GParamSpec *pspec)
|
||||
{
|
||||
QofBook *book;
|
||||
gchar *key;
|
||||
|
||||
g_return_if_fail (QOF_IS_BOOK (object));
|
||||
book = QOF_BOOK (object);
|
||||
|
@ -690,7 +690,6 @@ gboolean
|
||||
qof_instance_get_dirty (QofInstance *inst)
|
||||
{
|
||||
QofInstancePrivate *priv;
|
||||
QofCollection *coll;
|
||||
|
||||
if (!inst)
|
||||
{
|
||||
@ -705,7 +704,6 @@ void
|
||||
qof_instance_set_dirty(QofInstance* inst)
|
||||
{
|
||||
QofInstancePrivate *priv;
|
||||
QofCollection *coll;
|
||||
|
||||
priv = GET_PRIVATE(inst);
|
||||
priv->dirty = TRUE;
|
||||
|
@ -507,7 +507,7 @@ compile_sort (QofQuerySort *sort, QofIdType obj)
|
||||
|
||||
static void compile_terms (QofQuery *q)
|
||||
{
|
||||
GList *or_ptr, *and_ptr, *node;
|
||||
GList *or_ptr, *and_ptr;
|
||||
|
||||
ENTER (" query=%p", q);
|
||||
/* Find the specific functions for this Query. Note that the
|
||||
|
@ -69,8 +69,6 @@
|
||||
#include "test-engine-strings.h"
|
||||
#include <qofinstance-p.h>
|
||||
|
||||
static gboolean glist_strings_only = FALSE;
|
||||
|
||||
static GHashTable *exclude_kvp_types = NULL;
|
||||
static gint kvp_max_depth = 5;
|
||||
static gint kvp_frame_max_elements = 10;
|
||||
@ -152,8 +150,6 @@ kvp_type_excluded (KvpValue::Type kvp_type)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static gboolean zero_nsec = FALSE;
|
||||
|
||||
/* ========================================================== */
|
||||
|
||||
static inline gboolean
|
||||
@ -1702,11 +1698,9 @@ get_random_query(void)
|
||||
while (num_terms-- > 0)
|
||||
{
|
||||
gint pr_type;
|
||||
KvpValue *value;
|
||||
time64 start;
|
||||
time64 end;
|
||||
GList *guids;
|
||||
GSList *path;
|
||||
char *string;
|
||||
GncGUID *guid;
|
||||
|
||||
|
@ -288,8 +288,6 @@ TEST_F(ImapBayesTest, AddAccountBayes)
|
||||
auto acct1_guid = guid_to_string (xaccAccountGetGUID(t_expense_account1));
|
||||
auto acct2_guid = guid_to_string (xaccAccountGetGUID(t_expense_account2));
|
||||
auto value = root->get_slot({std::string{IMAP_FRAME_BAYES} + "/foo/bar"});
|
||||
auto check_account = [this](KvpValue* v) {
|
||||
return (v->get<const char*>(), gnc_account_get_book(this->t_acc)); };
|
||||
value = root->get_slot({std::string{IMAP_FRAME_BAYES} + "/" + foo + "/" + acct1_guid});
|
||||
EXPECT_EQ(1, value->get<int64_t>());
|
||||
value = root->get_slot({std::string{IMAP_FRAME_BAYES} + "/" + bar + "/" + acct1_guid});
|
||||
|
@ -40,7 +40,6 @@
|
||||
#endif
|
||||
|
||||
static const gchar *suitename = "/qof/gnc-date";
|
||||
static const time64 secs_per_year = INT64_C(3600) * (INT64_C(24) * INT64_C(365) + 6);
|
||||
static const time64 max_secs = (INT64_C(3600) * (INT64_C(24) * INT64_C(365) + 6)) * (INT64_C(9999) - INT64_C(1970));
|
||||
|
||||
typedef struct
|
||||
|
@ -36,8 +36,6 @@ TEST (GncGUID, creation)
|
||||
{
|
||||
auto guid = gnc::GUID::create_random ();
|
||||
EXPECT_NE (guid, gnc::GUID::null_guid ());
|
||||
// There should be a default constructor.
|
||||
GncGUID other;
|
||||
}
|
||||
|
||||
TEST (GncGUID, copy)
|
||||
|
@ -196,9 +196,6 @@ test_instance_new_destroy( void )
|
||||
/* test var */
|
||||
Time64 *time_priv;
|
||||
const char *msg1 = "qof_instance_get_collection: assertion 'QOF_IS_INSTANCE(ptr)' failed";
|
||||
const char *msg2 = "qof_instance_get_editlevel: assertion 'QOF_IS_INSTANCE(ptr)' failed";
|
||||
const char *msg3 = "qof_instance_get_destroying: assertion 'QOF_IS_INSTANCE(ptr)' failed";
|
||||
const char *msg4 = "qof_instance_get_dirty_flag: assertion 'QOF_IS_INSTANCE(ptr)' failed";
|
||||
const char *log_domain = "qof";
|
||||
auto loglevel = static_cast<GLogLevelFlags>(G_LOG_LEVEL_CRITICAL | G_LOG_FLAG_FATAL);
|
||||
auto check = test_error_struct_new(log_domain, loglevel, msg1);
|
||||
|
@ -440,7 +440,7 @@ gchar *gnc_account_name_violations_errmsg (const gchar *separator, GList* invali
|
||||
static void
|
||||
test_gnc_account_name_violations_errmsg ()
|
||||
{
|
||||
GList *badnames = NULL, *nonames = NULL, *node = NULL;
|
||||
GList *badnames = NULL, *nonames = NULL;
|
||||
auto separator = ":";
|
||||
/* FUT wants to free the strings, so we alloc them */
|
||||
badnames = g_list_prepend (badnames, g_strdup ("Foo:bar"));
|
||||
|
@ -167,7 +167,6 @@ test_gnc_set_budget_account_period_value()
|
||||
guint log_level = G_LOG_LEVEL_WARNING | G_LOG_FLAG_FATAL;
|
||||
gchar *log_domain = "gnc.engine";
|
||||
gchar *msg = "[gnc_budget_set_account_period_value()] Period 12 does not exist";
|
||||
guint hdlr;
|
||||
TestErrorStruct check = { log_level, log_domain, msg, 0 };
|
||||
GLogFunc oldlogger;
|
||||
|
||||
|
@ -195,8 +195,6 @@ setup_with_invoice_and_payment (Fixture *fixture, gconstpointer pData)
|
||||
static void
|
||||
setup_with_invoice_and_CN (Fixture *fixture, gconstpointer pData)
|
||||
{
|
||||
const InvoiceData *data = (InvoiceData*) pData;
|
||||
|
||||
time64 ts1 = gnc_time(NULL);
|
||||
time64 ts2 = ts1;
|
||||
const char *desc = "Test description";
|
||||
|
@ -561,7 +561,6 @@ test_xaccSplitCommitEdit (Fixture *fixture, gconstpointer pData)
|
||||
gchar *msg2 = "[xaccSplitCommitEdit()] Account grabbed split prematurely.";
|
||||
gchar *logdomain = "gnc.engine";
|
||||
GLogLevelFlags loglevel = static_cast<GLogLevelFlags>(G_LOG_LEVEL_CRITICAL | G_LOG_FLAG_FATAL);
|
||||
guint infolevel = G_LOG_LEVEL_INFO;
|
||||
guint hdlr;
|
||||
TestErrorStruct checkA = { loglevel, logdomain, msg1, 0 };
|
||||
TestErrorStruct checkB = { loglevel, logdomain, msg2, 0 };
|
||||
@ -1104,7 +1103,6 @@ xaccSplitOrder (const Split *sa, const Split *sb)// C: 5 in 3
|
||||
static void
|
||||
test_xaccSplitOrder (Fixture *fixture, gconstpointer pData)
|
||||
{
|
||||
const char *slot_path;
|
||||
Split *split = fixture->split;
|
||||
QofBook *book = xaccSplitGetBook (split);
|
||||
Split *o_split = xaccMallocSplit (book);
|
||||
|
@ -286,7 +286,6 @@ void mark_trans (Transaction *trans)// Local: 3:0:0
|
||||
static void
|
||||
test_mark_trans (Fixture *fixture, gconstpointer pData)
|
||||
{
|
||||
gboolean dirty_split = FALSE;
|
||||
GList *splits = NULL;
|
||||
|
||||
for (splits = (fixture->txn)->splits; splits; splits = splits->next)
|
||||
@ -357,7 +356,7 @@ test_gnc_transaction_dispose ()
|
||||
auto split = static_cast<Split*>(g_object_new (GNC_TYPE_SPLIT, "book", book, NULL));
|
||||
auto s_ref = split;
|
||||
gnc_commodity *curr = gnc_commodity_new (book, "Gnu Rand", "CURRENCY",
|
||||
"GNR", "", 240), *t_curr = NULL;
|
||||
"GNR", "", 240);
|
||||
gnc_commodity *c_ref = curr;
|
||||
g_object_add_weak_pointer (G_OBJECT (split), (gpointer*) &s_ref);
|
||||
g_object_add_weak_pointer (G_OBJECT (curr), (gpointer*) &c_ref);
|
||||
@ -464,7 +463,6 @@ test_xaccMallocTransaction (Fixture *fixture, gconstpointer pData)
|
||||
#endif
|
||||
auto msg = _func ": assertion 'book' failed";
|
||||
#undef _func
|
||||
auto logdomain = "gnc.engine";
|
||||
auto loglevel = static_cast<GLogLevelFlags>(G_LOG_LEVEL_CRITICAL | G_LOG_FLAG_FATAL);
|
||||
auto check = test_error_struct_new ("gnc.engine", loglevel, msg);
|
||||
fixture->hdlrs = test_log_set_fatal_handler (fixture->hdlrs, check,
|
||||
@ -597,7 +595,6 @@ test_xaccTransClone (Fixture *fixture, gconstpointer pData)
|
||||
Transaction *newtxn = NULL, *oldtxn = fixture->txn;
|
||||
QofBook *old_book = qof_instance_get_book (QOF_INSTANCE (oldtxn));
|
||||
GList *newnode, *oldnode;
|
||||
int foo, bar;
|
||||
|
||||
oldtxn->date_posted = posted;
|
||||
oldtxn->date_entered = entered;
|
||||
@ -658,8 +655,6 @@ test_xaccTransCopyFromClipBoard (Fixture *fixture, gconstpointer pData)
|
||||
Account *acc1 = xaccMallocAccount (book);
|
||||
Transaction *to_txn = xaccMallocTransaction (book);
|
||||
time64 now = gnc_time (nullptr);
|
||||
time64 never = 0;
|
||||
auto to_frame = to_txn->inst.kvp_data;
|
||||
|
||||
xaccAccountSetCommodity (acc1, fixture->comm);
|
||||
xaccTransCopyFromClipBoard (txn, to_txn, fixture->acc1, acc1, FALSE);
|
||||
@ -1020,7 +1015,6 @@ test_xaccTransGetImbalance_trading (Fixture *fixture,
|
||||
auto split2 = xaccMallocSplit (book);
|
||||
Account *acc1 = xaccMallocAccount (book);
|
||||
Account *acc2 = xaccMallocAccount (book);
|
||||
gnc_numeric value;
|
||||
MonetaryList *mlist;
|
||||
qof_book_begin_edit (book);
|
||||
qof_instance_set (QOF_INSTANCE (book),
|
||||
|
@ -582,7 +582,6 @@ static void
|
||||
setup(PriceDBFixture *fixture, gconstpointer data)
|
||||
{
|
||||
QofBook *book = NULL;
|
||||
GNCPrice *price = NULL;
|
||||
gnc_pricedb_register();
|
||||
book = qof_book_new();
|
||||
fixture->com = setup_commodities(book);
|
||||
|
@ -111,7 +111,6 @@ gnc_ui_account_get_tax_info_string (const Account *account)
|
||||
|
||||
if (get_form == SCM_UNDEFINED)
|
||||
{
|
||||
const gchar *tax_module;
|
||||
/* load the tax info */
|
||||
gnc_locale_tax_init ();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user