r22203 - gnucash/trunk/src - Correct -Wunused warnings
John Ralls
jralls at code.gnucash.org
Sat May 26 19:47:36 EDT 2012
Author: jralls
Date: 2012-05-26 19:47:34 -0400 (Sat, 26 May 2012)
New Revision: 22203
Trac: http://svn.gnucash.org/trac/changeset/22203
Modified:
gnucash/trunk/src/app-utils/calculation/fin.c
gnucash/trunk/src/app-utils/file-utils.c
gnucash/trunk/src/app-utils/gnc-addr-quickfill.c
gnucash/trunk/src/app-utils/gnc-entry-quickfill.c
gnucash/trunk/src/app-utils/gnc-euro.c
gnucash/trunk/src/app-utils/gnc-sx-instance-model.c
gnucash/trunk/src/app-utils/gnc-ui-balances.c
gnucash/trunk/src/app-utils/gnc-ui-util.c
gnucash/trunk/src/app-utils/guile-util.c
gnucash/trunk/src/backend/dbi/gnc-backend-dbi.c
gnucash/trunk/src/backend/dbi/test/test-dbi-business-stuff.c
gnucash/trunk/src/backend/dbi/test/test-dbi-stuff.c
gnucash/trunk/src/backend/dbi/test/utest-backend-dbi-business.c
gnucash/trunk/src/backend/sql/gnc-account-sql.c
gnucash/trunk/src/backend/sql/gnc-address-sql.c
gnucash/trunk/src/backend/sql/gnc-backend-sql.c
gnucash/trunk/src/backend/sql/gnc-bill-term-sql.c
gnucash/trunk/src/backend/sql/gnc-book-sql.c
gnucash/trunk/src/backend/sql/gnc-customer-sql.c
gnucash/trunk/src/backend/sql/gnc-employee-sql.c
gnucash/trunk/src/backend/sql/gnc-entry-sql.c
gnucash/trunk/src/backend/sql/gnc-invoice-sql.c
gnucash/trunk/src/backend/sql/gnc-job-sql.c
gnucash/trunk/src/backend/sql/gnc-lots-sql.c
gnucash/trunk/src/backend/sql/gnc-order-sql.c
gnucash/trunk/src/backend/sql/gnc-owner-sql.c
gnucash/trunk/src/backend/sql/gnc-recurrence-sql.c
gnucash/trunk/src/backend/sql/gnc-schedxaction-sql.c
gnucash/trunk/src/backend/sql/gnc-slots-sql.c
gnucash/trunk/src/backend/sql/gnc-tax-table-sql.c
gnucash/trunk/src/backend/sql/gnc-transaction-sql.c
gnucash/trunk/src/backend/sql/gnc-vendor-sql.c
gnucash/trunk/src/backend/xml/gnc-account-xml-v2.c
gnucash/trunk/src/backend/xml/gnc-bill-term-xml-v2.c
gnucash/trunk/src/backend/xml/gnc-book-xml-v2.c
gnucash/trunk/src/backend/xml/gnc-customer-xml-v2.c
gnucash/trunk/src/backend/xml/gnc-employee-xml-v2.c
gnucash/trunk/src/backend/xml/gnc-entry-xml-v2.c
gnucash/trunk/src/backend/xml/gnc-freqspec-xml-v2.c
gnucash/trunk/src/backend/xml/gnc-invoice-xml-v2.c
gnucash/trunk/src/backend/xml/gnc-job-xml-v2.c
gnucash/trunk/src/backend/xml/gnc-lot-xml-v2.c
gnucash/trunk/src/backend/xml/gnc-order-xml-v2.c
gnucash/trunk/src/backend/xml/gnc-tax-table-xml-v2.c
gnucash/trunk/src/backend/xml/gnc-transaction-xml-v2.c
gnucash/trunk/src/backend/xml/gnc-vendor-xml-v2.c
gnucash/trunk/src/backend/xml/io-gncxml-v1.c
gnucash/trunk/src/backend/xml/test/test-xml-transaction.c
gnucash/trunk/src/bin/gnucash-bin.c
gnucash/trunk/src/business/business-gnome/business-gnome-utils.c
gnucash/trunk/src/business/business-gnome/dialog-customer.c
gnucash/trunk/src/business/business-gnome/dialog-invoice.c
gnucash/trunk/src/business/business-gnome/dialog-order.c
gnucash/trunk/src/business/business-gnome/dialog-payment.c
gnucash/trunk/src/business/business-gnome/dialog-vendor.c
gnucash/trunk/src/business/business-gnome/gnc-plugin-business.c
gnucash/trunk/src/business/business-gnome/gnc-plugin-page-invoice.c
gnucash/trunk/src/business/business-gnome/gnc-plugin-page-owner-tree.c
gnucash/trunk/src/business/business-gnome/search-owner.c
gnucash/trunk/src/business/business-ledger/gncEntryLedgerControl.c
gnucash/trunk/src/business/business-ledger/gncEntryLedgerLoad.c
gnucash/trunk/src/core-utils/gnc-filepath-utils.c
gnucash/trunk/src/core-utils/gnc-uri-utils.c
gnucash/trunk/src/engine/Account.c
gnucash/trunk/src/engine/Scrub.c
gnucash/trunk/src/engine/Transaction.c
gnucash/trunk/src/engine/TransactionP.h
gnucash/trunk/src/engine/gnc-hooks.c
gnucash/trunk/src/engine/gnc-pricedb.c
gnucash/trunk/src/engine/gncIDSearch.c
gnucash/trunk/src/engine/gncInvoice.c
gnucash/trunk/src/engine/gncJob.c
gnucash/trunk/src/engine/policy.c
gnucash/trunk/src/engine/test-core/test-engine-stuff.c
gnucash/trunk/src/engine/test/test-account-object.c
gnucash/trunk/src/engine/test/test-guid.c
gnucash/trunk/src/engine/test/test-transaction-reversal.c
gnucash/trunk/src/engine/test/test-vendor.c
gnucash/trunk/src/engine/test/utest-Account.c
gnucash/trunk/src/engine/test/utest-Invoice.c
gnucash/trunk/src/engine/test/utest-Split.c
gnucash/trunk/src/gnome-search/dialog-search.c
gnucash/trunk/src/gnome-utils/assistant-gconf-setup.c
gnucash/trunk/src/gnome-utils/assistant-xml-encoding.c
gnucash/trunk/src/gnome-utils/dialog-book-close.c
gnucash/trunk/src/gnome-utils/dialog-dup-trans.c
gnucash/trunk/src/gnome-utils/dialog-file-access.c
gnucash/trunk/src/gnome-utils/dialog-object-references.c
gnucash/trunk/src/gnome-utils/dialog-options.c
gnucash/trunk/src/gnome-utils/dialog-transfer.c
gnucash/trunk/src/gnome-utils/gnc-account-sel.c
gnucash/trunk/src/gnome-utils/gnc-autosave.c
gnucash/trunk/src/gnome-utils/gnc-date-edit.c
gnucash/trunk/src/gnome-utils/gnc-date-format.c
gnucash/trunk/src/gnome-utils/gnc-dense-cal.c
gnucash/trunk/src/gnome-utils/gnc-embedded-window.c
gnucash/trunk/src/gnome-utils/gnc-file.c
gnucash/trunk/src/gnome-utils/gnc-general-select.c
gnucash/trunk/src/gnome-utils/gnc-gnome-utils.c
gnucash/trunk/src/gnome-utils/gnc-keyring.c
gnucash/trunk/src/gnome-utils/gnc-main-window.c
gnucash/trunk/src/gnome-utils/gnc-plugin-file-history.c
gnucash/trunk/src/gnome-utils/gnc-plugin-manager.c
gnucash/trunk/src/gnome-utils/gnc-plugin-menu-additions.c
gnucash/trunk/src/gnome-utils/gnc-plugin.c
gnucash/trunk/src/gnome-utils/gnc-query-list.c
gnucash/trunk/src/gnome-utils/gnc-recurrence.c
gnucash/trunk/src/gnome-utils/gnc-tree-model-account-types.c
gnucash/trunk/src/gnome-utils/gnc-tree-model-account.c
gnucash/trunk/src/gnome-utils/gnc-tree-model-owner.c
gnucash/trunk/src/gnome-utils/gnc-tree-model-price.c
gnucash/trunk/src/gnome-utils/gnc-tree-model.c
gnucash/trunk/src/gnome-utils/gnc-tree-view-account.c
gnucash/trunk/src/gnome-utils/gnc-tree-view-commodity.c
gnucash/trunk/src/gnome-utils/gnc-tree-view-owner.c
gnucash/trunk/src/gnome-utils/gnc-tree-view-price.c
gnucash/trunk/src/gnome-utils/gnc-tree-view-sx-list.c
gnucash/trunk/src/gnome-utils/gnc-tree-view.c
gnucash/trunk/src/gnome/assistant-acct-period.c
gnucash/trunk/src/gnome/assistant-hierarchy.c
gnucash/trunk/src/gnome/assistant-loan.c
gnucash/trunk/src/gnome/assistant-stock-split.c
gnucash/trunk/src/gnome/dialog-commodities.c
gnucash/trunk/src/gnome/dialog-lot-viewer.c
gnucash/trunk/src/gnome/dialog-price-editor.c
gnucash/trunk/src/gnome/dialog-print-check.c
gnucash/trunk/src/gnome/dialog-sx-editor.c
gnucash/trunk/src/gnome/dialog-sx-from-trans.c
gnucash/trunk/src/gnome/dialog-sx-since-last-run.c
gnucash/trunk/src/gnome/dialog-tax-info.c
gnucash/trunk/src/gnome/gnc-plugin-account-tree.c
gnucash/trunk/src/gnome/gnc-plugin-basic-commands.c
gnucash/trunk/src/gnome/gnc-plugin-budget.c
gnucash/trunk/src/gnome/gnc-plugin-page-account-tree.c
gnucash/trunk/src/gnome/gnc-plugin-page-budget.c
gnucash/trunk/src/gnome/gnc-plugin-page-register.c
gnucash/trunk/src/gnome/gnc-plugin-page-sx-list.c
gnucash/trunk/src/gnome/gnc-plugin-register.c
gnucash/trunk/src/gnome/gnc-split-reg.c
gnucash/trunk/src/gnome/reconcile-list.c
gnucash/trunk/src/gnome/top-level.c
gnucash/trunk/src/gnome/window-reconcile.c
gnucash/trunk/src/html/gnc-html-factory.c
gnucash/trunk/src/html/gnc-html-graph-gog-webkit.c
gnucash/trunk/src/html/gnc-html-graph-gog.c
gnucash/trunk/src/html/gnc-html-webkit.c
gnucash/trunk/src/html/gnc-html.c
gnucash/trunk/src/import-export/aqbanking/assistant-ab-initial.c
gnucash/trunk/src/import-export/aqbanking/dialog-ab-trans.c
gnucash/trunk/src/import-export/aqbanking/gnc-ab-getbalance.c
gnucash/trunk/src/import-export/aqbanking/gnc-ab-gettrans.c
gnucash/trunk/src/import-export/aqbanking/gnc-ab-kvp.c
gnucash/trunk/src/import-export/aqbanking/gnc-ab-trans-templ.c
gnucash/trunk/src/import-export/aqbanking/gnc-ab-transfer.c
gnucash/trunk/src/import-export/aqbanking/gnc-ab-utils.c
gnucash/trunk/src/import-export/aqbanking/gnc-gwen-gui.c
gnucash/trunk/src/import-export/csv-export/assistant-csv-export.c
gnucash/trunk/src/import-export/csv-export/csv-transactions-export.c
gnucash/trunk/src/import-export/csv-export/gnc-plugin-csv-export.c
gnucash/trunk/src/import-export/csv-import/assistant-csv-account-import.c
gnucash/trunk/src/import-export/csv-import/assistant-csv-trans-import.c
gnucash/trunk/src/import-export/csv-import/gnc-csv-model.c
gnucash/trunk/src/import-export/csv-import/gnc-plugin-csv-import.c
gnucash/trunk/src/import-export/import-backend.c
gnucash/trunk/src/import-export/import-main-matcher.c
gnucash/trunk/src/import-export/log-replay/gnc-plugin-log-replay.c
gnucash/trunk/src/import-export/ofx/gnc-ofx-import.c
gnucash/trunk/src/import-export/ofx/gnc-ofx-kvp.c
gnucash/trunk/src/import-export/ofx/gnc-plugin-ofx.c
gnucash/trunk/src/import-export/qif-import/assistant-qif-import.c
gnucash/trunk/src/import-export/qif-import/gnc-plugin-qif-import.c
gnucash/trunk/src/libqof/qof/gnc-date.c
gnucash/trunk/src/libqof/qof/kvp_frame.c
gnucash/trunk/src/libqof/qof/qof-string-cache.c
gnucash/trunk/src/libqof/qof/qofbackend.c
gnucash/trunk/src/libqof/qof/qofbook.c
gnucash/trunk/src/libqof/qof/qofchoice.c
gnucash/trunk/src/libqof/qof/qofevent.c
gnucash/trunk/src/libqof/qof/qofinstance.c
gnucash/trunk/src/libqof/qof/qofquerycore.c
gnucash/trunk/src/libqof/qof/qofsession.c
gnucash/trunk/src/libqof/qof/qofutil.c
gnucash/trunk/src/libqof/qof/test/test-gnc-date.c
gnucash/trunk/src/libqof/qof/test/test-qof-string-cache.c
gnucash/trunk/src/libqof/qof/test/test-qofbook.c
gnucash/trunk/src/libqof/qof/test/test-qofsession.c
gnucash/trunk/src/plugins/bi_import/dialog-bi-import-gui.c
gnucash/trunk/src/plugins/bi_import/dialog-bi-import.c
gnucash/trunk/src/plugins/customer_import/dialog-customer-import-gui.c
gnucash/trunk/src/python/gncmod-python.c
gnucash/trunk/src/register/ledger-core/split-register-control.c
gnucash/trunk/src/register/ledger-core/split-register-load.c
gnucash/trunk/src/register/register-core/table-allgui.c
gnucash/trunk/src/register/register-gnome/gnucash-cursor.c
gnucash/trunk/src/register/register-gnome/gnucash-grid.c
gnucash/trunk/src/register/register-gnome/gnucash-header.c
gnucash/trunk/src/register/register-gnome/gnucash-item-edit.c
gnucash/trunk/src/register/register-gnome/gnucash-sheet.c
gnucash/trunk/src/report/report-gnome/dialog-custom-report.c
gnucash/trunk/src/report/report-gnome/gnc-plugin-page-report.c
gnucash/trunk/src/report/stylesheets/gnc-plugin-stylesheets.c
gnucash/trunk/src/test-core/unittest-support.c
Log:
Correct -Wunused warnings
The actual change to configure.ac (at line 1106) to enable -Wunused -- or rather to un-disable it -- is not included in order to not break the build for folks with buggy versions of swig.
(For example, https://sourceforge.net/tracker/?func=detail&aid=3530021&group_id=1645&atid=101645)
Modified: gnucash/trunk/src/app-utils/calculation/fin.c
===================================================================
--- gnucash/trunk/src/app-utils/calculation/fin.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/app-utils/calculation/fin.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -1795,7 +1795,6 @@
unsigned bep = amortsched->bep;
double cpmt = 0;
double final_pmt = 0;
- double delayed_int = amortsched->delayed_int;
char summary = amortsched->summary;
unsigned option = amortsched->option;
unsigned yr_pmt = amortsched->yr_pmt;
@@ -1832,7 +1831,6 @@
summary = (summary == 'y') ? 'x' : 'o';
break;
case 3:
- delayed_int = 0.0;
amortsched->final_pmt = final_pmt = amortsched->final_pmt_opt_3;
break;
case 4:
Modified: gnucash/trunk/src/app-utils/file-utils.c
===================================================================
--- gnucash/trunk/src/app-utils/file-utils.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/app-utils/file-utils.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -69,8 +69,6 @@
if (scm_is_string(scm_result))
{
- char * str;
-
scm_dynwind_begin (0);
full_filename = scm_to_locale_string(scm_result);
return_string = g_strdup (full_filename);
@@ -207,7 +205,7 @@
const gchar *guid,
gchar **filename_p)
{
- gchar *basename, *original = NULL, *filename, *tmp, *file_guid;
+ gchar *basename, *original = NULL, *filename, *file_guid;
gchar *sf_extension = NULL, *newstyle_filename = NULL;
GKeyFile *key_file = NULL;
gint i;
Modified: gnucash/trunk/src/app-utils/gnc-addr-quickfill.c
===================================================================
--- gnucash/trunk/src/app-utils/gnc-addr-quickfill.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/app-utils/gnc-addr-quickfill.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -28,7 +28,7 @@
#include "engine/gncAddress.h"
/* This static indicates the debugging module that this .o belongs to. */
-static QofLogModule log_module = GNC_MOD_REGISTER;
+G_GNUC_UNUSED static QofLogModule log_module = GNC_MOD_REGISTER;
typedef struct
{
@@ -136,7 +136,6 @@
* current book. */
static QofQuery *new_query_for_addresss(QofBook *book)
{
- GSList *primary_sort_params = NULL;
QofQuery *query = qof_query_create_for (GNC_ID_ADDRESS);
g_assert(book);
qof_query_set_book (query, book);
Modified: gnucash/trunk/src/app-utils/gnc-entry-quickfill.c
===================================================================
--- gnucash/trunk/src/app-utils/gnc-entry-quickfill.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/app-utils/gnc-entry-quickfill.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -27,7 +27,7 @@
#include "engine/gncEntry.h"
/* This static indicates the debugging module that this .o belongs to. */
-static QofLogModule log_module = GNC_MOD_REGISTER;
+G_GNUC_UNUSED static QofLogModule log_module = GNC_MOD_REGISTER;
typedef struct
{
Modified: gnucash/trunk/src/app-utils/gnc-euro.c
===================================================================
--- gnucash/trunk/src/app-utils/gnc-euro.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/app-utils/gnc-euro.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -86,6 +86,7 @@
return g_ascii_strcasecmp(gnc_commodity_get_mnemonic(curr), euro->currency);
}
+#if 0 /* Not Used */
static int
gnc_euro_rate_compare_code (const void * key, const void * value)
{
@@ -97,6 +98,7 @@
return g_ascii_strcasecmp (code, euro->currency);
}
+#endif
/* ------------------------------------------------------ */
Modified: gnucash/trunk/src/app-utils/gnc-sx-instance-model.c
===================================================================
--- gnucash/trunk/src/app-utils/gnc-sx-instance-model.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/app-utils/gnc-sx-instance-model.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -688,10 +688,8 @@
}
else if (GNC_IS_SXES(ent))
{
- SchedXactions *sxes = GNC_SXES(ent);
SchedXaction *sx = GNC_SX(evt_data);
- sxes = NULL;
if (event_type & GNC_EVENT_ITEM_REMOVED)
{
GList *instances_link;
@@ -1552,7 +1550,6 @@
{
SxCashflowData *creation_data = user_data;
GList *template_splits;
- gboolean err_flag = FALSE;
const gnc_commodity *first_cmdty = NULL;
g_debug("Evaluating txn desc [%s] for sx [%s]",
@@ -1583,7 +1580,6 @@
if (!_get_template_split_account(creation_data->sx, template_split, &split_acct, creation_data->creation_errors))
{
g_debug("Could not find account for split");
- err_flag = TRUE;
break;
}
Modified: gnucash/trunk/src/app-utils/gnc-ui-balances.c
===================================================================
--- gnucash/trunk/src/app-utils/gnc-ui-balances.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/app-utils/gnc-ui-balances.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -34,7 +34,7 @@
#include "gncOwner.h"
#include "qof.h"
-static QofLogModule log_module = GNC_MOD_GUI;
+G_GNUC_UNUSED static QofLogModule log_module = GNC_MOD_GUI;
/********************************************************************
* Balance calculations related to accounts
Modified: gnucash/trunk/src/app-utils/gnc-ui-util.c
===================================================================
--- gnucash/trunk/src/app-utils/gnc-ui-util.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/app-utils/gnc-ui-util.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -767,6 +767,7 @@
return TRUE;
}
+#if 0 /* Not Used */
static void
gnc_lconv_set_utf8 (char **p_value, char *default_value)
{
@@ -810,8 +811,8 @@
if ((p_value != NULL) && (*p_value == CHAR_MAX))
*p_value = default_value;
}
+#endif /* Not Used */
-
gnc_commodity *
gnc_locale_default_currency_nodefault (void)
{
@@ -1174,7 +1175,6 @@
/* rounding? -- can only ROUND if force_fit is also true */
if (value_is_decimal && info->round && info->force_fit)
{
- gnc_numeric oldval = val;
rounding.num = 5; /* Limit the denom to 10^13 ~= 2^44, leaving max at ~524288 */
rounding.denom = pow(10, max_dp + 1);
val = gnc_numeric_add(val, rounding, GNC_DENOM_AUTO, GNC_HOW_DENOM_LCD);
Modified: gnucash/trunk/src/app-utils/guile-util.c
===================================================================
--- gnucash/trunk/src/app-utils/guile-util.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/app-utils/guile-util.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -1099,7 +1099,6 @@
char *
gnc_get_debit_string(GNCAccountType account_type)
{
- const gchar *string;
SCM result;
SCM arg;
@@ -1131,7 +1130,6 @@
char *
gnc_get_credit_string(GNCAccountType account_type)
{
- const gchar *string;
SCM result;
SCM arg;
Modified: gnucash/trunk/src/backend/dbi/gnc-backend-dbi.c
===================================================================
--- gnucash/trunk/src/backend/dbi/gnc-backend-dbi.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/backend/dbi/gnc-backend-dbi.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -221,8 +221,6 @@
static void
sqlite3_error_fn( dbi_conn conn, /*@ unused @*/ void* user_data )
{
- GncDbiBackend *be = (GncDbiBackend*)user_data;
- GncDbiSqlConnection *dbi_conn = (GncDbiSqlConnection*)be->sql_be.conn;
const gchar* msg;
(void)dbi_conn_error( conn, &msg );
@@ -1512,6 +1510,7 @@
return result;
}
+#if 0 /* Not Used */
/**
* Really a bit of an understatement. More like "delete everything in
* storage and replace with what's in memory".
@@ -1529,7 +1528,6 @@
GncDbiSqlConnection *conn = (GncDbiSqlConnection*)(((GncSqlBackend*)be)->conn);
GSList* table_name_list;
const gchar* dbname;
- gint status;
g_return_if_fail( be != NULL );
g_return_if_fail( book != NULL );
@@ -1553,6 +1551,7 @@
LEAVE( "book=%p", book );
}
+#endif
/**
* Safely resave a database by renaming all of its tables, recreating
@@ -1570,7 +1569,6 @@
GncDbiSqlConnection *conn = (GncDbiSqlConnection*)(((GncSqlBackend*)be)->conn);
GSList *table_list, *index_list, *iter;
const gchar* dbname = NULL;
- gint status;
g_return_if_fail( be != NULL );
g_return_if_fail( book != NULL );
@@ -1757,7 +1755,6 @@
{
FILE* f;
gchar buf[50];
- size_t chars_read;
gint status;
gchar *filename;
@@ -1776,7 +1773,7 @@
}
// OK if file has the correct header
- chars_read = fread( buf, sizeof(buf), 1, f );
+ fread( buf, sizeof(buf), 1, f );
status = fclose( f );
if ( status < 0 )
{
@@ -2307,6 +2304,7 @@
return create_dbi_statement( conn, sql );
}
+#if 0 /* Not Used */
static GValue*
create_gvalue_from_string( /*@ only @*/ gchar* s )
{
@@ -2320,6 +2318,7 @@
return s_gval;
}
+#endif
static gboolean
conn_does_table_exist( GncSqlConnection* conn, const gchar* table_name )
@@ -2483,7 +2482,6 @@
{
GString* ddl;
const GList* list_node;
- const GncSqlColumnTableEntry* table_row;
guint col_num;
GncDbiSqlConnection* dbi_conn = (GncDbiSqlConnection*)conn;
@@ -2821,7 +2819,6 @@
GncDbiSqlConnection* dbi_conn = (GncDbiSqlConnection*)conn;
gchar* ddl;
dbi_result result;
- gint status;
g_return_val_if_fail( conn != NULL, FALSE );
g_return_val_if_fail( index_name != NULL, FALSE );
@@ -2858,7 +2855,6 @@
GncDbiSqlConnection* dbi_conn = (GncDbiSqlConnection*)conn;
gchar* ddl;
dbi_result result;
- gint status;
g_return_val_if_fail( conn != NULL, FALSE );
g_return_val_if_fail( table_name != NULL, FALSE );
@@ -2916,7 +2912,6 @@
while ( dbi_result_next_row( tables ) != 0 )
{
const gchar* table_name;
- dbi_result result;
table_name = dbi_result_get_string_idx( tables, 1 );
list = g_slist_prepend( list, strdup( table_name ) );
Modified: gnucash/trunk/src/backend/dbi/test/test-dbi-business-stuff.c
===================================================================
--- gnucash/trunk/src/backend/dbi/test/test-dbi-business-stuff.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/backend/dbi/test/test-dbi-business-stuff.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -41,7 +41,7 @@
#include "gncEmployee.h"
#include "gncVendor.h"
-static QofLogModule log_module = "test-dbi";
+G_GNUC_UNUSED static QofLogModule log_module = "test-dbi";
static void
compare_single_customer( QofInstance* inst, gpointer user_data )
Modified: gnucash/trunk/src/backend/dbi/test/test-dbi-stuff.c
===================================================================
--- gnucash/trunk/src/backend/dbi/test/test-dbi-stuff.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/backend/dbi/test/test-dbi-stuff.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -39,7 +39,7 @@
#include "gnc-commodity.h"
#include "../gnc-backend-dbi-priv.h"
-static QofLogModule log_module = "test-dbi";
+G_GNUC_UNUSED static QofLogModule log_module = "test-dbi";
void
do_compare( QofBook* book_1, QofBook* book_2, const gchar* id, QofInstanceForeachCB cb, const gchar* msg )
Modified: gnucash/trunk/src/backend/dbi/test/utest-backend-dbi-business.c
===================================================================
--- gnucash/trunk/src/backend/dbi/test/utest-backend-dbi-business.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/backend/dbi/test/utest-backend-dbi-business.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -92,9 +92,6 @@
GncAddress* addr;
GncCustomer* cust;
GncEmployee* emp;
- GncVendor* v;
- GncInvoice* inv;
- GncJob* job;
GncTaxTable* tt;
GncTaxTableEntry* tte;
@@ -158,7 +155,7 @@
static const gchar* fixed_load_order[] =
{ GNC_ID_BILLTERM, GNC_ID_TAXTABLE, NULL };
-static void
+G_GNUC_UNUSED static void
init_business_sql(void)
{
/* Initialize our pointers into the backend subsystem */
Modified: gnucash/trunk/src/backend/sql/gnc-account-sql.c
===================================================================
--- gnucash/trunk/src/backend/sql/gnc-account-sql.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/backend/sql/gnc-account-sql.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -201,7 +201,6 @@
GncSqlStatement* stmt = NULL;
GncSqlResult* result;
QofBook* pBook;
- gnc_commodity_table* pTable;
GList* l_accounts_needing_parents = NULL;
GSList* bal_slist;
GSList* bal;
@@ -211,7 +210,6 @@
ENTER( "" );
pBook = be->book;
- pTable = gnc_commodity_table_get_table( pBook );
stmt = gnc_sql_create_select_statement( be, TABLE_NAME );
if ( stmt == NULL )
@@ -224,12 +222,11 @@
if ( result != NULL )
{
GncSqlRow* row = gnc_sql_result_get_first_row( result );
- Account* acc;
gchar* sql;
while ( row != NULL )
{
- acc = load_single_account( be, row, &l_accounts_needing_parents );
+ load_single_account( be, row, &l_accounts_needing_parents );
row = gnc_sql_result_get_next_row( result );
}
gnc_sql_result_dispose( result );
Modified: gnucash/trunk/src/backend/sql/gnc-address-sql.c
===================================================================
--- gnucash/trunk/src/backend/sql/gnc-address-sql.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/backend/sql/gnc-address-sql.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -41,7 +41,7 @@
#include "gnc-backend-sql.h"
#include "gnc-address-sql.h"
-static QofLogModule log_module = G_LOG_DOMAIN;
+G_GNUC_UNUSED static QofLogModule log_module = G_LOG_DOMAIN;
#define ADDRESS_MAX_NAME_LEN 1024
#define ADDRESS_MAX_ADDRESS_LINE_LEN 1024
@@ -130,7 +130,6 @@
GncSqlColumnInfo* info;
gchar* buf;
const GncSqlColumnTableEntry* subtable_row;
- const gchar* type;
g_return_if_fail( be != NULL );
g_return_if_fail( table_row != NULL );
Modified: gnucash/trunk/src/backend/sql/gnc-backend-sql.c
===================================================================
--- gnucash/trunk/src/backend/sql/gnc-backend-sql.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/backend/sql/gnc-backend-sql.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -806,7 +806,7 @@
}
else if ( strcmp( pPredData->type_name, "numeric" ) == 0 )
{
- query_numeric_t pData = (query_numeric_t)pPredData;
+ /* query_numeric_t pData = (query_numeric_t)pPredData; */
g_string_append( sql, "numeric" );
}
@@ -923,14 +923,12 @@
gnc_sql_compile_query_to_sql( GncSqlBackend* be, QofQuery* query )
{
QofIdType searchObj;
- GList* bookList;
GString* sql;
g_return_val_if_fail( be != NULL, NULL );
g_return_val_if_fail( query != NULL, NULL );
searchObj = qof_query_get_search_for( query );
- bookList = qof_query_get_books( query );
/* Convert search object type to table name */
sql = g_string_new( "" );
@@ -1800,7 +1798,6 @@
GncGUID* guid = NULL;
gchar guid_buf[GUID_ENCODING_LENGTH+1];
GValue* value;
- gboolean free_guid = FALSE;
g_return_if_fail( be != NULL );
g_return_if_fail( obj_name != NULL );
@@ -1812,7 +1809,6 @@
if ( table_row->gobj_param_name != NULL )
{
g_object_get( pObject, table_row->gobj_param_name, &guid, NULL );
- free_guid = TRUE;
}
else
{
@@ -1831,12 +1827,6 @@
(*pList) = g_slist_append( (*pList), value );
-#if 0
- if ( free_guid )
- {
- g_free( guid );
- }
-#endif
}
static GncSqlColumnTypeHandler guid_handler
@@ -3276,9 +3266,7 @@
}
else
{
- gboolean ok;
-
- ok = do_create_table( be, VERSION_TABLE_NAME, version_table );
+ do_create_table( be, VERSION_TABLE_NAME, version_table );
}
}
Modified: gnucash/trunk/src/backend/sql/gnc-bill-term-sql.c
===================================================================
--- gnucash/trunk/src/backend/sql/gnc-bill-term-sql.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/backend/sql/gnc-bill-term-sql.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -225,12 +225,9 @@
{
GncSqlStatement* stmt;
GncSqlResult* result;
- QofBook* pBook;
g_return_if_fail( be != NULL );
- pBook = be->book;
-
stmt = gnc_sql_create_select_statement( be, TABLE_NAME );
result = gnc_sql_execute_select_statement( be, stmt );
gnc_sql_statement_dispose( stmt );
@@ -266,8 +263,6 @@
if ( l_billterms_needing_parents != NULL )
{
gboolean progress_made = TRUE;
- GncTaxTable* root;
- Account* pParent;
GList* elem;
while ( progress_made )
Modified: gnucash/trunk/src/backend/sql/gnc-book-sql.c
===================================================================
--- gnucash/trunk/src/backend/sql/gnc-book-sql.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/backend/sql/gnc-book-sql.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -48,7 +48,7 @@
#define BOOK_TABLE "books"
#define TABLE_VERSION 1
-/*@ unused @*/ static QofLogModule log_module = G_LOG_DOMAIN;
+G_GNUC_UNUSED static QofLogModule log_module = G_LOG_DOMAIN;
static /*@ dependent @*//*@ null @*/ gpointer get_root_account_guid( gpointer pObject );
static void set_root_account_guid( gpointer pObject, /*@ null @*/ gpointer pValue );
@@ -140,13 +140,12 @@
static void
load_single_book( GncSqlBackend* be, GncSqlRow* row )
{
- const GncGUID* guid;
QofBook* pBook;
g_return_if_fail( be != NULL );
g_return_if_fail( row != NULL );
- guid = gnc_sql_load_guid( be, row );
+ gnc_sql_load_guid( be, row );
pBook = be->book;
if ( pBook == NULL )
Modified: gnucash/trunk/src/backend/sql/gnc-customer-sql.c
===================================================================
--- gnucash/trunk/src/backend/sql/gnc-customer-sql.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/backend/sql/gnc-customer-sql.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -110,11 +110,9 @@
{
GncSqlStatement* stmt;
GncSqlResult* result;
- QofBook* pBook;
g_return_if_fail( be != NULL );
- pBook = be->book;
stmt = gnc_sql_create_select_statement( be, TABLE_NAME );
result = gnc_sql_execute_select_statement( be, stmt );
Modified: gnucash/trunk/src/backend/sql/gnc-employee-sql.c
===================================================================
--- gnucash/trunk/src/backend/sql/gnc-employee-sql.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/backend/sql/gnc-employee-sql.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -98,14 +98,9 @@
{
GncSqlStatement* stmt;
GncSqlResult* result;
- QofBook* pBook;
- gnc_commodity_table* pTable;
g_return_if_fail( be != NULL );
- pBook = be->book;
- pTable = gnc_commodity_table_get_table( pBook );
-
stmt = gnc_sql_create_select_statement( be, TABLE_NAME );
result = gnc_sql_execute_select_statement( be, stmt );
gnc_sql_statement_dispose( stmt );
Modified: gnucash/trunk/src/backend/sql/gnc-entry-sql.c
===================================================================
--- gnucash/trunk/src/backend/sql/gnc-entry-sql.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/backend/sql/gnc-entry-sql.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -175,12 +175,9 @@
{
GncSqlStatement* stmt;
GncSqlResult* result;
- QofBook* pBook;
g_return_if_fail( be != NULL );
- pBook = be->book;
-
stmt = gnc_sql_create_select_statement( be, TABLE_NAME );
result = gnc_sql_execute_select_statement( be, stmt );
gnc_sql_statement_dispose( stmt );
Modified: gnucash/trunk/src/backend/sql/gnc-invoice-sql.c
===================================================================
--- gnucash/trunk/src/backend/sql/gnc-invoice-sql.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/backend/sql/gnc-invoice-sql.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -118,12 +118,9 @@
{
GncSqlStatement* stmt;
GncSqlResult* result;
- QofBook* pBook;
g_return_if_fail( be != NULL );
- pBook = be->book;
-
stmt = gnc_sql_create_select_statement( be, TABLE_NAME );
result = gnc_sql_execute_select_statement( be, stmt );
gnc_sql_statement_dispose( stmt );
Modified: gnucash/trunk/src/backend/sql/gnc-job-sql.c
===================================================================
--- gnucash/trunk/src/backend/sql/gnc-job-sql.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/backend/sql/gnc-job-sql.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -43,7 +43,7 @@
#define _GNC_MOD_NAME GNC_ID_JOB
-static QofLogModule log_module = G_LOG_DOMAIN;
+G_GNUC_UNUSED static QofLogModule log_module = G_LOG_DOMAIN;
#define TABLE_NAME "jobs"
#define TABLE_VERSION 1
@@ -95,12 +95,9 @@
{
GncSqlStatement* stmt;
GncSqlResult* result;
- QofBook* pBook;
g_return_if_fail( be != NULL );
- pBook = be->book;
-
stmt = gnc_sql_create_select_statement( be, TABLE_NAME );
result = gnc_sql_execute_select_statement( be, stmt );
gnc_sql_statement_dispose( stmt );
Modified: gnucash/trunk/src/backend/sql/gnc-lots-sql.c
===================================================================
--- gnucash/trunk/src/backend/sql/gnc-lots-sql.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/backend/sql/gnc-lots-sql.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -129,12 +129,11 @@
if ( result != NULL )
{
GncSqlRow* row = gnc_sql_result_get_first_row( result );
- GNCLot* lot;
gchar* sql;
while ( row != NULL )
{
- lot = load_single_lot( be, row );
+ load_single_lot( be, row );
row = gnc_sql_result_get_next_row( result );
}
gnc_sql_result_dispose( result );
Modified: gnucash/trunk/src/backend/sql/gnc-order-sql.c
===================================================================
--- gnucash/trunk/src/backend/sql/gnc-order-sql.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/backend/sql/gnc-order-sql.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -92,12 +92,9 @@
{
GncSqlStatement* stmt;
GncSqlResult* result;
- QofBook* pBook;
g_return_if_fail( be != NULL );
- pBook = be->book;
-
stmt = gnc_sql_create_select_statement( be, TABLE_NAME );
result = gnc_sql_execute_select_statement( be, stmt );
gnc_sql_statement_dispose( stmt );
Modified: gnucash/trunk/src/backend/sql/gnc-owner-sql.c
===================================================================
--- gnucash/trunk/src/backend/sql/gnc-owner-sql.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/backend/sql/gnc-owner-sql.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -170,7 +170,6 @@
{
GncSqlColumnInfo* info;
gchar* buf;
- const gchar* type;
g_return_if_fail( be != NULL );
g_return_if_fail( table_row != NULL );
Modified: gnucash/trunk/src/backend/sql/gnc-recurrence-sql.c
===================================================================
--- gnucash/trunk/src/backend/sql/gnc-recurrence-sql.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/backend/sql/gnc-recurrence-sql.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -42,7 +42,7 @@
#include "splint-defs.h"
#endif
-/*@ unused @*/ static QofLogModule log_module = G_LOG_DOMAIN;
+G_GNUC_UNUSED static QofLogModule log_module = G_LOG_DOMAIN;
#define TABLE_NAME "recurrences"
#define TABLE_VERSION 1
Modified: gnucash/trunk/src/backend/sql/gnc-schedxaction-sql.c
===================================================================
--- gnucash/trunk/src/backend/sql/gnc-schedxaction-sql.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/backend/sql/gnc-schedxaction-sql.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -51,7 +51,7 @@
#define SCHEDXACTION_TABLE "schedxactions"
#define TABLE_VERSION 1
-/*@ unused @*/ static QofLogModule log_module = G_LOG_DOMAIN;
+G_GNUC_UNUSED static QofLogModule log_module = G_LOG_DOMAIN;
#define SX_MAX_NAME_LEN 2048
Modified: gnucash/trunk/src/backend/sql/gnc-slots-sql.c
===================================================================
--- gnucash/trunk/src/backend/sql/gnc-slots-sql.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/backend/sql/gnc-slots-sql.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -209,7 +209,7 @@
static gchar *
get_path_from_path( GString *path )
{
- gchar *str = NULL, *key = NULL, *ret = NULL;
+ gchar *str = NULL, *key = NULL;
g_return_val_if_fail( path != NULL, NULL );
Modified: gnucash/trunk/src/backend/sql/gnc-tax-table-sql.c
===================================================================
--- gnucash/trunk/src/backend/sql/gnc-tax-table-sql.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/backend/sql/gnc-tax-table-sql.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -54,7 +54,6 @@
static gpointer get_obj_guid( gpointer pObject, const QofParam* param );
static void set_obj_guid( gpointer pObject, gpointer pValue );
-static gpointer get_child( gpointer pObject, const QofParam* param );
static gpointer bt_get_parent( gpointer pObject );
static void tt_set_parent( gpointer pObject, gpointer pValue );
static void tt_set_parent_guid( gpointer pObject, gpointer pValue );
@@ -140,7 +139,7 @@
{
// Nowhere to put the GncGUID
}
-
+#if 0 /* Not Used */
static gpointer
get_child( gpointer pObject, const QofParam* param )
{
@@ -151,6 +150,7 @@
return gncTaxTableGetChild( tt );
}
+#endif
static /*@ null @*//*@ dependent @*/ gpointer
bt_get_parent( gpointer pObject )
@@ -234,7 +234,6 @@
GValue value;
gchar* buf;
GncSqlStatement* stmt;
- GError* error = NULL;
g_return_if_fail( be != NULL );
g_return_if_fail( tt != NULL );
@@ -339,8 +338,6 @@
if ( tt_needing_parents != NULL )
{
gboolean progress_made = TRUE;
- GncTaxTable* root;
- Account* pParent;
GList* elem;
while ( progress_made )
Modified: gnucash/trunk/src/backend/sql/gnc-transaction-sql.c
===================================================================
--- gnucash/trunk/src/backend/sql/gnc-transaction-sql.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/backend/sql/gnc-transaction-sql.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -89,7 +89,6 @@
static /*@ dependent @*//*@ null @*/ gpointer get_split_reconcile_state( gpointer pObject );
static void set_split_reconcile_state( gpointer pObject, /*@ null @*/ gpointer pValue );
-static void set_split_reconcile_date( gpointer pObject, Timespec ts );
static void set_split_lot( gpointer pObject, /*@ null @*/ gpointer pLot );
#define SPLIT_MAX_MEMO_LEN 2048
@@ -168,7 +167,7 @@
xaccSplitSetReconcile( GNC_SPLIT(pObject), s[0] );
}
-
+#if 0 /* Not Used */
static void
set_split_reconcile_date( gpointer pObject, Timespec ts )
{
@@ -177,6 +176,7 @@
xaccSplitSetDateReconciledTS( GNC_SPLIT(pObject), &ts );
}
+#endif
static void
set_split_lot( gpointer pObject, /*@ null @*/ gpointer pLot )
@@ -319,6 +319,7 @@
gnc_numeric end_reconciled_bal;
} full_acct_balances_t;
+#if 0 /* Not Used */
/**
* Saves the start/end balances for an account.
*
@@ -364,7 +365,7 @@
g_free( pstart_r );
g_free( pend_r );
}
-
+#endif
/**
* Executes a transaction query statement and loads the transactions and all
* of the splits.
@@ -387,11 +388,11 @@
GList* node;
GncSqlRow* row;
Transaction* tx;
+#if LOAD_TRANSACTIONS_AS_NEEDED
GSList* bal_list = NULL;
GSList* nextbal;
Account* root = gnc_book_get_root_account( be->book );
-#if LOAD_TRANSACTIONS_AS_NEEDED
qof_event_suspend();
xaccAccountBeginEdit( root );
@@ -776,8 +777,8 @@
}
if (! is_ok )
{
- gchar *message1 = "Transaction %s dated %s in account %s not saved due to %s.%s";
- gchar *message2 = "\nDatabase may be corrupted, check your data carefully.";
+ G_GNUC_UNUSED gchar *message1 = "Transaction %s dated %s in account %s not saved due to %s.%s";
+ G_GNUC_UNUSED gchar *message2 = "\nDatabase may be corrupted, check your data carefully.";
Split* split = xaccTransGetSplit( pTx, 0);
Account *acc = xaccSplitGetAccount( split );
/* FIXME: This needs to be implemented
@@ -819,6 +820,7 @@
}
/* ================================================================= */
+#if 0 /* Not Used */
static /*@ dependent @*//*@ null @*/ const GncGUID*
get_guid_from_query( QofQuery* pQuery )
{
@@ -849,7 +851,7 @@
return NULL;
}
}
-
+#endif
/**
* Loads all transactions for an account.
*
@@ -946,15 +948,12 @@
static void
convert_query_term_to_sql( const GncSqlBackend* be, const gchar* fieldName, QofQueryTerm* pTerm, GString* sql )
{
- GSList* pParamPath;
QofQueryPredData* pPredData;
gboolean isInverted;
- GSList* name;
g_return_if_fail( pTerm != NULL );
g_return_if_fail( sql != NULL );
- pParamPath = qof_query_term_get_param_path( pTerm );
pPredData = qof_query_term_get_pred_data( pTerm );
isInverted = qof_query_term_is_inverted( pTerm );
@@ -1130,11 +1129,11 @@
gboolean has_been_run;
} split_query_info_t;
-static /*@ null @*/ gpointer
+#define TX_GUID_CHECK 0
+
+G_GNUC_UNUSED static /*@ null @*/ gpointer
compile_split_query( GncSqlBackend* be, QofQuery* query )
{
- const GncGUID* acct_guid;
- gchar guid_buf[GUID_ENCODING_LENGTH+1];
split_query_info_t* query_info = NULL;
gchar* query_sql;
@@ -1157,8 +1156,9 @@
GList* andterms = (GList*)orTerm->data;
GList* andTerm;
gboolean need_AND = FALSE;
+#if TX_GUID_CHECK
gboolean has_tx_guid_check = FALSE;
-
+#endif
if ( need_OR )
{
g_string_append( sql, " OR " );
@@ -1198,7 +1198,7 @@
}
else if ( strcmp( paramPath->data, SPLIT_TRANS ) == 0 )
{
-#if 0
+#if TX_GUID_CHECK
if ( !has_tx_guid_check )
{
g_string_append( sql, "(splits.tx_guid = transactions.guid) AND " );
@@ -1290,7 +1290,7 @@
return query_info;
}
-static void
+G_GNUC_UNUSED static void
run_split_query( GncSqlBackend* be, gpointer pQuery )
{
split_query_info_t* query_info = (split_query_info_t*)pQuery;
@@ -1307,7 +1307,7 @@
}
}
-static void
+G_GNUC_UNUSED static void
free_split_query( GncSqlBackend* be, gpointer pQuery )
{
g_return_if_fail( be != NULL );
@@ -1370,7 +1370,7 @@
/*@ +full_init_block @*/
};
-static /*@ null @*/ single_acct_balance_t*
+G_GNUC_UNUSED static /*@ null @*/ single_acct_balance_t*
load_single_acct_balances( const GncSqlBackend* be, GncSqlRow* row )
{
single_acct_balance_t* bal = NULL;
Modified: gnucash/trunk/src/backend/sql/gnc-vendor-sql.c
===================================================================
--- gnucash/trunk/src/backend/sql/gnc-vendor-sql.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/backend/sql/gnc-vendor-sql.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -51,7 +51,7 @@
#define _GNC_MOD_NAME GNC_ID_VENDOR
-static QofLogModule log_module = G_LOG_DOMAIN;
+G_GNUC_UNUSED static QofLogModule log_module = G_LOG_DOMAIN;
#define MAX_NAME_LEN 2048
#define MAX_ID_LEN 2048
@@ -103,12 +103,9 @@
{
GncSqlStatement* stmt;
GncSqlResult* result;
- QofBook* pBook;
g_return_if_fail( be != NULL );
- pBook = be->book;
-
stmt = gnc_sql_create_select_statement( be, TABLE_NAME );
result = gnc_sql_execute_select_statement( be, stmt );
gnc_sql_statement_dispose( stmt );
Modified: gnucash/trunk/src/backend/xml/gnc-account-xml-v2.c
===================================================================
--- gnucash/trunk/src/backend/xml/gnc-account-xml-v2.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/backend/xml/gnc-account-xml-v2.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -475,14 +475,12 @@
gpointer parent_data, gpointer global_data,
gpointer *result, const gchar *tag)
{
- int successful;
Account *acc, *parent, *root;
xmlNodePtr tree = (xmlNodePtr)data_for_children;
gxpf_data *gdata = (gxpf_data*)global_data;
QofBook *book = gdata->bookdata;
int type;
- successful = TRUE;
if (parent_data)
{
Modified: gnucash/trunk/src/backend/xml/gnc-bill-term-xml-v2.c
===================================================================
--- gnucash/trunk/src/backend/xml/gnc-bill-term-xml-v2.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/backend/xml/gnc-bill-term-xml-v2.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -453,13 +453,11 @@
gpointer parent_data, gpointer global_data,
gpointer *result, const gchar *tag)
{
- int successful;
GncBillTerm *term;
xmlNodePtr tree = (xmlNodePtr)data_for_children;
gxpf_data *gdata = (gxpf_data*)global_data;
QofBook *book = gdata->bookdata;
- successful = TRUE;
if (parent_data)
{
Modified: gnucash/trunk/src/backend/xml/gnc-book-xml-v2.c
===================================================================
--- gnucash/trunk/src/backend/xml/gnc-book-xml-v2.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/backend/xml/gnc-book-xml-v2.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -102,7 +102,7 @@
gnc_book_dom_tree_create(QofBook *book)
{
xmlNodePtr ret;
- gboolean allow_incompat = TRUE;
+ G_GNUC_UNUSED gboolean allow_incompat = TRUE;
ret = xmlNewNode(NULL, BAD_CAST gnc_book_string);
xmlSetProp(ret, BAD_CAST "version", BAD_CAST gnc_v2_book_version_string);
@@ -225,12 +225,10 @@
gpointer parent_data, gpointer global_data,
gpointer *result, const gchar *tag)
{
- int successful;
xmlNodePtr tree = (xmlNodePtr)data_for_children;
gxpf_data *gdata = (gxpf_data*)global_data;
QofBook *book = gdata->bookdata;
- successful = TRUE;
if (parent_data) return TRUE;
Modified: gnucash/trunk/src/backend/xml/gnc-customer-xml-v2.c
===================================================================
--- gnucash/trunk/src/backend/xml/gnc-customer-xml-v2.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/backend/xml/gnc-customer-xml-v2.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -423,13 +423,11 @@
gpointer parent_data, gpointer global_data,
gpointer *result, const gchar *tag)
{
- int successful;
GncCustomer *cust;
xmlNodePtr tree = (xmlNodePtr)data_for_children;
gxpf_data *gdata = (gxpf_data*)global_data;
QofBook *book = gdata->bookdata;
- successful = TRUE;
if (parent_data)
{
Modified: gnucash/trunk/src/backend/xml/gnc-employee-xml-v2.c
===================================================================
--- gnucash/trunk/src/backend/xml/gnc-employee-xml-v2.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/backend/xml/gnc-employee-xml-v2.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -346,13 +346,11 @@
gpointer parent_data, gpointer global_data,
gpointer *result, const gchar *tag)
{
- int successful;
GncEmployee *employee;
xmlNodePtr tree = (xmlNodePtr)data_for_children;
gxpf_data *gdata = (gxpf_data*)global_data;
QofBook *book = gdata->bookdata;
- successful = TRUE;
if (parent_data)
{
Modified: gnucash/trunk/src/backend/xml/gnc-entry-xml-v2.c
===================================================================
--- gnucash/trunk/src/backend/xml/gnc-entry-xml-v2.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/backend/xml/gnc-entry-xml-v2.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -753,13 +753,11 @@
gpointer parent_data, gpointer global_data,
gpointer *result, const gchar *tag)
{
- int successful;
GncEntry *entry;
xmlNodePtr tree = (xmlNodePtr)data_for_children;
gxpf_data *gdata = (gxpf_data*)global_data;
QofBook *book = gdata->bookdata;
- successful = TRUE;
if (parent_data)
{
Modified: gnucash/trunk/src/backend/xml/gnc-freqspec-xml-v2.c
===================================================================
--- gnucash/trunk/src/backend/xml/gnc-freqspec-xml-v2.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/backend/xml/gnc-freqspec-xml-v2.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -409,9 +409,6 @@
gboolean
fs_guid_handler( xmlNodePtr node, gpointer data)
{
- fsParseData *fspd = data;
- GncGUID *guid;
- guid = dom_tree_to_guid( node );
return TRUE;
}
Modified: gnucash/trunk/src/backend/xml/gnc-invoice-xml-v2.c
===================================================================
--- gnucash/trunk/src/backend/xml/gnc-invoice-xml-v2.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/backend/xml/gnc-invoice-xml-v2.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -466,14 +466,11 @@
gpointer parent_data, gpointer global_data,
gpointer *result, const gchar *tag)
{
- int successful;
GncInvoice *invoice;
xmlNodePtr tree = (xmlNodePtr)data_for_children;
gxpf_data *gdata = (gxpf_data*)global_data;
QofBook *book = gdata->bookdata;
- successful = TRUE;
-
if (parent_data)
{
return TRUE;
Modified: gnucash/trunk/src/backend/xml/gnc-job-xml-v2.c
===================================================================
--- gnucash/trunk/src/backend/xml/gnc-job-xml-v2.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/backend/xml/gnc-job-xml-v2.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -239,14 +239,11 @@
gpointer parent_data, gpointer global_data,
gpointer *result, const gchar *tag)
{
- int successful;
GncJob *job;
xmlNodePtr tree = (xmlNodePtr)data_for_children;
gxpf_data *gdata = (gxpf_data*)global_data;
QofBook *book = gdata->bookdata;
- successful = TRUE;
-
if (parent_data)
{
return TRUE;
Modified: gnucash/trunk/src/backend/xml/gnc-lot-xml-v2.c
===================================================================
--- gnucash/trunk/src/backend/xml/gnc-lot-xml-v2.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/backend/xml/gnc-lot-xml-v2.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -133,14 +133,11 @@
gpointer parent_data, gpointer global_data,
gpointer *result, const gchar *tag)
{
- int successful;
GNCLot *lot;
xmlNodePtr tree = (xmlNodePtr)data_for_children;
gxpf_data *gdata = (gxpf_data*)global_data;
QofBook *book = gdata->bookdata;
- successful = TRUE;
-
if (parent_data)
{
return TRUE;
Modified: gnucash/trunk/src/backend/xml/gnc-order-xml-v2.c
===================================================================
--- gnucash/trunk/src/backend/xml/gnc-order-xml-v2.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/backend/xml/gnc-order-xml-v2.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -282,14 +282,11 @@
gpointer parent_data, gpointer global_data,
gpointer *result, const gchar *tag)
{
- int successful;
GncOrder *order;
xmlNodePtr tree = (xmlNodePtr)data_for_children;
gxpf_data *gdata = (gxpf_data*)global_data;
QofBook *book = gdata->bookdata;
- successful = TRUE;
-
if (parent_data)
{
return TRUE;
Modified: gnucash/trunk/src/backend/xml/gnc-tax-table-xml-v2.c
===================================================================
--- gnucash/trunk/src/backend/xml/gnc-tax-table-xml-v2.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/backend/xml/gnc-tax-table-xml-v2.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -415,14 +415,11 @@
gpointer parent_data, gpointer global_data,
gpointer *result, const gchar *tag)
{
- int successful;
GncTaxTable *table;
xmlNodePtr tree = (xmlNodePtr)data_for_children;
gxpf_data *gdata = (gxpf_data*)global_data;
QofBook *book = gdata->bookdata;
- successful = TRUE;
-
if (parent_data)
{
return TRUE;
Modified: gnucash/trunk/src/backend/xml/gnc-transaction-xml-v2.c
===================================================================
--- gnucash/trunk/src/backend/xml/gnc-transaction-xml-v2.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/backend/xml/gnc-transaction-xml-v2.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -579,7 +579,6 @@
gpointer *result, const gchar *tag)
{
Transaction *trn = NULL;
- gboolean successful = FALSE;
xmlNodePtr tree = (xmlNodePtr)data_for_children;
gxpf_data *gdata = (gxpf_data*)global_data;
@@ -601,7 +600,6 @@
if (trn != NULL)
{
gdata->cb(tag, gdata->parsedata, trn);
- successful = TRUE;
}
xmlFreeNode(tree);
Modified: gnucash/trunk/src/backend/xml/gnc-vendor-xml-v2.c
===================================================================
--- gnucash/trunk/src/backend/xml/gnc-vendor-xml-v2.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/backend/xml/gnc-vendor-xml-v2.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -367,14 +367,11 @@
gpointer parent_data, gpointer global_data,
gpointer *result, const gchar *tag)
{
- int successful;
GncVendor *vendor;
xmlNodePtr tree = (xmlNodePtr)data_for_children;
gxpf_data *gdata = (gxpf_data*)global_data;
QofBook *book = gdata->bookdata;
- successful = TRUE;
-
if (parent_data)
{
return TRUE;
Modified: gnucash/trunk/src/backend/xml/io-gncxml-v1.c
===================================================================
--- gnucash/trunk/src/backend/xml/io-gncxml-v1.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/backend/xml/io-gncxml-v1.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -1937,10 +1937,9 @@
if (strcmp(child_result->tag, "fraction") == 0)
{
gint64 frac;
- gboolean conv_ok;
if (cpi->seen_fraction) return(FALSE);
- conv_ok = string_to_gint64((gchar *) child_result->data, &frac);
+ string_to_gint64((gchar *) child_result->data, &frac);
cpi->fraction = frac;
cpi->seen_fraction = TRUE;
child_result->should_cleanup = TRUE;
Modified: gnucash/trunk/src/backend/xml/test/test-xml-transaction.c
===================================================================
--- gnucash/trunk/src/backend/xml/test/test-xml-transaction.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/backend/xml/test/test-xml-transaction.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -375,7 +375,6 @@
for (i = 0; i < 50; i++)
{
Transaction *ran_trn;
- Account *root;
xmlNodePtr test_node;
gnc_commodity *com, *new_com;
gchar *compare_msg;
@@ -384,7 +383,7 @@
/* The next line exists for its side effect of creating the
* account tree. */
- root = get_random_account_tree(book);
+ get_random_account_tree(book);
ran_trn = get_random_transaction(book);
new_com = get_random_commodity( book );
if (!ran_trn)
Modified: gnucash/trunk/src/bin/gnucash-bin.c
===================================================================
--- gnucash/trunk/src/bin/gnucash-bin.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/bin/gnucash-bin.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -93,6 +93,7 @@
_("To find the last stable version, please refer to http://www.gnucash.org"));
}
+#ifndef MAC_INTEGRATION
static gchar *environment_expand(gchar *param)
{
gchar *search_start;
@@ -166,7 +167,6 @@
static void
environment_override()
{
- const gchar *path;
gchar *config_path;
gchar *env_file;
GKeyFile *keyfile = g_key_file_new();
@@ -269,7 +269,7 @@
g_key_file_free(keyfile);
}
-#ifdef MAC_INTEGRATION
+#else /* MAC_INTEGRATION */
static void
set_mac_locale()
{
Modified: gnucash/trunk/src/business/business-gnome/business-gnome-utils.c
===================================================================
--- gnucash/trunk/src/business/business-gnome/business-gnome-utils.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/business/business-gnome/business-gnome-utils.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -316,7 +316,6 @@
GList *acct_types, GList *acct_commodities)
{
GtkListStore *store;
- GtkEntry *entry;
GList *list, *node;
char *text;
@@ -554,7 +553,6 @@
void
gnc_taxincluded_combo (GtkComboBox *cbox, GncTaxIncluded initial_choice)
{
- GtkWidget *menu;
GtkListStore *liststore;
if (!cbox) return;
Modified: gnucash/trunk/src/business/business-gnome/dialog-customer.c
===================================================================
--- gnucash/trunk/src/business/business-gnome/dialog-customer.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/business/business-gnome/dialog-customer.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -451,7 +451,6 @@
{
GtkComboBox *cbox = GTK_COMBO_BOX (widget);
CustomerWindow *cw = data;
- gchar *title;
if (!cw) return;
if (!cbox) return;
@@ -464,7 +463,6 @@
{
GtkComboBox *cbox = GTK_COMBO_BOX (widget);
CustomerWindow *cw = data;
- gchar *title;
if (!cw) return;
if (!cbox) return;
@@ -477,7 +475,6 @@
{
GtkComboBox *cbox = GTK_COMBO_BOX (widget);
CustomerWindow *cw = data;
- gchar *title;
if (!cw) return;
if (!cbox) return;
@@ -1072,7 +1069,6 @@
CustomerWindow *wdata = user_data;
gchar *concatenated_text;
QuickFill *match;
- const gchar *match_str;
gint prefix_len, concatenated_text_len;
if (new_text_length <= 0)
Modified: gnucash/trunk/src/business/business-gnome/dialog-invoice.c
===================================================================
--- gnucash/trunk/src/business/business-gnome/dialog-invoice.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/business/business-gnome/dialog-invoice.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -233,7 +233,6 @@
GtkToggleButton *toggle;
GtkBuilder *builder;
gint response;
- char *s;
builder = gtk_builder_new();
gnc_builder_add_from_file (builder, "dialog-invoice.glade", "Unpost Message Dialog");
@@ -1367,11 +1366,8 @@
/* If this owner really changed, then reset ourselves */
if (!gncOwnerEqual (&owner, &(iw->owner)))
{
- GncInvoice *invoice;
-
gncOwnerCopy (&owner, &(iw->owner));
gncOwnerInitJob (&(iw->job), NULL);
- invoice = iw_get_invoice (iw);
gnc_entry_ledger_reset_query (iw->ledger);
}
@@ -1927,7 +1923,6 @@
{
GtkComboBox *cbox = GTK_COMBO_BOX (widget);
InvoiceWindow *iw = data;
- gchar *title;
if (!iw) return;
if (!cbox) return;
@@ -2531,7 +2526,6 @@
InvoiceWindow *iw;
GncInvoice *new_invoice = NULL;
gchar *new_id;
- GList *node;
GDate new_date_gdate;
g_assert(old_invoice);
@@ -2676,7 +2670,6 @@
static void
multi_duplicate_invoice_cb (GList *invoice_list, gpointer user_data)
{
- struct _invoice_select_window *sw = user_data; // unused, though
g_return_if_fail (invoice_list);
switch (g_list_length(invoice_list))
{
Modified: gnucash/trunk/src/business/business-gnome/dialog-order.c
===================================================================
--- gnucash/trunk/src/business/business-gnome/dialog-order.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/business/business-gnome/dialog-order.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -507,8 +507,6 @@
if (hide_cd)
{
- GtkWidget *hide;
-
gtk_widget_hide_all (ow->closed_date);
gtk_widget_hide_all (ow->cd_label);
gtk_widget_hide_all (ow->hide1);
@@ -517,8 +515,6 @@
if (ow->dialog_type == VIEW_ORDER)
{
- GtkWidget *hide;
-
/* Setup viewer for read-only access */
gtk_widget_set_sensitive (ow->id_entry, FALSE);
gtk_widget_set_sensitive (ow->opened_date, FALSE);
Modified: gnucash/trunk/src/business/business-gnome/dialog-payment.c
===================================================================
--- gnucash/trunk/src/business/business-gnome/dialog-payment.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/business/business-gnome/dialog-payment.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -175,7 +175,6 @@
gnc_payment_dialog_calculate_selected_total (PaymentWindow *pw)
{
GtkTreeSelection *selection;
- GList *list = NULL, *node;
gnc_numeric val = gnc_numeric_zero();
if (!pw->docs_list_tree_view || !GTK_IS_TREE_VIEW(pw->docs_list_tree_view))
@@ -194,7 +193,6 @@
static void
gnc_payment_dialog_document_selection_changed (PaymentWindow *pw)
{
- GNCLot *lot;
gnc_numeric val;
/* Don't change the amount based on the selected documents
@@ -232,7 +230,6 @@
{
GNCLot *lot = node->data;
const gchar *doc_date_str = NULL;
- const gchar *doc_num_str = NULL;
const gchar *doc_type_str = NULL;
const gchar *doc_id_str = NULL;
const gchar *doc_deb_str = NULL;
@@ -243,7 +240,6 @@
gnc_numeric value = gnc_numeric_zero();
gnc_numeric debit = gnc_numeric_zero();
gnc_numeric credit = gnc_numeric_zero();
- GncInvoiceType doc_type = GNC_INVOICE_UNDEFINED;
/* Find the lot's document if it exists,
* it could also be a prepayment lot. */
@@ -266,7 +262,6 @@
/* Find the document type. No type means pre-payment in this case */
if (document)
{
- doc_type = gncInvoiceGetType (document);
doc_type_str = gncInvoiceGetTypeString (document);
}
else
@@ -350,11 +345,9 @@
gnc_payment_dialog_owner_changed (PaymentWindow *pw)
{
Account *last_acct = NULL;
- Account *post_acct = NULL;
GncGUID *guid = NULL;
KvpValue* value;
KvpFrame* slots;
- gchar *text;
GncOwner *owner = &pw->owner;
/* If the owner changed, the initial invoice is no longer valid */
@@ -571,7 +564,6 @@
const char *memo, *num;
Timespec date;
gnc_numeric exch = gnc_numeric_create(1, 1); //default to "one to one" rate
- GNCLot *payment_lot;
GList *selected_lots = NULL;
GtkTreeSelection *selection;
Modified: gnucash/trunk/src/business/business-gnome/dialog-vendor.c
===================================================================
--- gnucash/trunk/src/business/business-gnome/dialog-vendor.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/business/business-gnome/dialog-vendor.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -320,7 +320,6 @@
{
GtkComboBox *cbox = GTK_COMBO_BOX (widget);
VendorWindow *vw = data;
- gchar *title;
if (!vw) return;
if (!cbox) return;
@@ -333,7 +332,6 @@
{
GtkComboBox *cbox = GTK_COMBO_BOX (widget);
VendorWindow *vw = data;
- gchar *title;
if (!vw) return;
if (!cbox) return;
@@ -346,7 +344,6 @@
{
GtkComboBox *cbox = GTK_COMBO_BOX (widget);
VendorWindow *vw = data;
- gchar *title;
if (!vw) return;
if (!cbox) return;
Modified: gnucash/trunk/src/business/business-gnome/gnc-plugin-business.c
===================================================================
--- gnucash/trunk/src/business/business-gnome/gnc-plugin-business.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/business/business-gnome/gnc-plugin-business.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -56,7 +56,7 @@
#include "gnc-plugin-page-register.h"
/* This static indicates the debugging module that this .o belongs to. */
-static QofLogModule log_module = G_LOG_DOMAIN;
+G_GNUC_UNUSED static QofLogModule log_module = G_LOG_DOMAIN;
/* g_object functions */
static void gnc_plugin_business_class_init (GncPluginBusinessClass *klass);
@@ -449,14 +449,8 @@
static void
gnc_plugin_business_finalize (GObject *object)
{
- GncPluginBusiness *plugin;
- GncPluginBusinessPrivate *priv;
-
g_return_if_fail (GNC_IS_PLUGIN_BUSINESS (object));
- plugin = GNC_PLUGIN_BUSINESS (object);
- priv = GNC_PLUGIN_BUSINESS_GET_PRIVATE (plugin);
-
G_OBJECT_CLASS (parent_class)->finalize (object);
}
@@ -799,14 +793,9 @@
gnc_plugin_business_cmd_tax_tables (GtkAction *action,
GncMainWindowActionData *mw)
{
- GncPluginBusiness *plugin;
- GncPluginBusinessPrivate *priv;
-
g_return_if_fail (mw != NULL);
g_return_if_fail (GNC_IS_PLUGIN_BUSINESS (mw->data));
- plugin = GNC_PLUGIN_BUSINESS (mw->data);
- priv = GNC_PLUGIN_BUSINESS_GET_PRIVATE (plugin);
gnc_ui_tax_table_window_new (gnc_get_current_book());
}
@@ -814,14 +803,9 @@
gnc_plugin_business_cmd_billing_terms (GtkAction *action,
GncMainWindowActionData *mw)
{
- GncPluginBusiness *plugin;
- GncPluginBusinessPrivate *priv;
-
g_return_if_fail (mw != NULL);
g_return_if_fail (GNC_IS_PLUGIN_BUSINESS (mw->data));
- plugin = GNC_PLUGIN_BUSINESS (mw->data);
- priv = GNC_PLUGIN_BUSINESS_GET_PRIVATE (plugin);
gnc_ui_billterms_window_new (gnc_get_current_book());
}
Modified: gnucash/trunk/src/business/business-gnome/gnc-plugin-page-invoice.c
===================================================================
--- gnucash/trunk/src/business/business-gnome/gnc-plugin-page-invoice.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/business/business-gnome/gnc-plugin-page-invoice.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -370,13 +370,10 @@
static void
gnc_plugin_page_invoice_init (GncPluginPageInvoice *plugin_page)
{
- GncPluginPageInvoicePrivate *priv;
GncPluginPage *parent;
GtkActionGroup *action_group;
gboolean use_new;
- priv = GNC_PLUGIN_PAGE_INVOICE_GET_PRIVATE(plugin_page);
-
/* Init parent declared variables */
parent = GNC_PLUGIN_PAGE(plugin_page);
use_new = gnc_gconf_get_bool(GCONF_SECTION_INVOICE, KEY_USE_NEW, NULL);
@@ -408,15 +405,9 @@
static void
gnc_plugin_page_invoice_finalize (GObject *object)
{
- GncPluginPageInvoice *page;
- GncPluginPageInvoicePrivate *priv;
-
g_return_if_fail (GNC_IS_PLUGIN_PAGE_INVOICE (object));
ENTER("object %p", object);
- page = GNC_PLUGIN_PAGE_INVOICE (object);
- priv = GNC_PLUGIN_PAGE_INVOICE_GET_PRIVATE(page);
-
G_OBJECT_CLASS (parent_class)->finalize (object);
LEAVE(" ");
}
Modified: gnucash/trunk/src/business/business-gnome/gnc-plugin-page-owner-tree.c
===================================================================
--- gnucash/trunk/src/business/business-gnome/gnc-plugin-page-owner-tree.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/business/business-gnome/gnc-plugin-page-owner-tree.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -122,7 +122,9 @@
/* Command callbacks */
static void gnc_plugin_page_owner_tree_cmd_new_owner (GtkAction *action, GncPluginPageOwnerTree *page);
static void gnc_plugin_page_owner_tree_cmd_edit_owner (GtkAction *action, GncPluginPageOwnerTree *page);
+#if 0 /* Disabled due to crash */
static void gnc_plugin_page_owner_tree_cmd_delete_owner (GtkAction *action, GncPluginPageOwnerTree *page);
+#endif
static void gnc_plugin_page_owner_tree_cmd_view_filter_by (GtkAction *action, GncPluginPageOwnerTree *page);
static void gnc_plugin_page_owner_tree_cmd_new_invoice (GtkAction *action, GncPluginPageOwnerTree *page);
static void gnc_plugin_page_owner_tree_cmd_owners_report (GtkAction *action, GncPluginPageOwnerTree *plugin_page);
@@ -169,11 +171,13 @@
G_CALLBACK (gnc_plugin_page_owner_tree_cmd_new_owner)
},
-/* FIXME disabled due to crash {
+#if 0 /* Disabled due to crash */
+ {
"EditDeleteOwnerAction", GNC_STOCK_DELETE_ACCOUNT, N_("_Delete Owner..."), "Delete",
N_("Delete selected owner"),
G_CALLBACK (gnc_plugin_page_owner_tree_cmd_delete_owner)
- }, */
+ },
+#endif /* Disabled due to crash */
/* View menu */
{
@@ -578,10 +582,8 @@
gnc_plugin_page_owner_tree_close_cb (gpointer user_data)
{
GncPluginPage *plugin_page;
- GncPluginPageOwnerTree *page;
plugin_page = GNC_PLUGIN_PAGE(user_data);
- page = GNC_PLUGIN_PAGE_OWNER_TREE (plugin_page);
gnc_main_window_close_page(plugin_page);
}
@@ -817,12 +819,10 @@
GdkEventButton *event,
GncPluginPage *page)
{
- gboolean result;
-
g_return_val_if_fail(GNC_IS_PLUGIN_PAGE(page), FALSE);
ENTER("widget %p, event %p, page %p", widget, event, page);
- result = gnc_main_window_button_press_cb(widget, event, page);
+ gnc_main_window_button_press_cb(widget, event, page);
LEAVE(" ");
/* Always return FALSE. This will let the tree view callback run as
@@ -850,7 +850,6 @@
GncPluginPageOwnerTree *page)
{
GtkActionGroup *action_group;
- GtkAction *action;
GtkTreeView *view;
GncOwner *owner = NULL;
gboolean sensitive;
@@ -885,10 +884,8 @@
static int
build_aging_report (GncOwnerType owner_type)
{
- Account *account;
gchar *report_name = NULL;
gchar *report_title = NULL;
- swig_type_info * qtype;
SCM args;
SCM func;
SCM arg;
@@ -949,7 +946,6 @@
static int build_owner_report (GncOwner *owner, Account *acc)
{
- int id;
SCM args;
SCM func;
SCM arg;
@@ -1041,12 +1037,12 @@
LEAVE(" ");
}
+#if 0 /* Disabled due to crash */
static void
gnc_plugin_page_owner_tree_cmd_delete_owner (GtkAction *action, GncPluginPageOwnerTree *page)
{
GncOwner *owner = gnc_plugin_page_owner_tree_get_current_owner (page);
gchar *owner_name;
- GtkWidget *widget;
GtkWidget *window;
GtkWidget *dialog = NULL;
gint response;
@@ -1108,6 +1104,7 @@
}
g_free(owner_name);
}
+#endif /* Disabled due to crash */
/*********************/
Modified: gnucash/trunk/src/business/business-gnome/search-owner.c
===================================================================
--- gnucash/trunk/src/business/business-gnome/search-owner.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/business/business-gnome/search-owner.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -127,14 +127,8 @@
static void
gnc_search_owner_finalize (GObject *obj)
{
- GNCSearchOwner *o;
- GNCSearchOwnerPrivate *priv;
-
g_assert (IS_GNCSEARCH_OWNER (obj));
- o = GNCSEARCH_OWNER(obj);
- priv = GNC_SEARCH_OWNER_GET_PRIVATE(o);
-
G_OBJECT_CLASS (parent_class)->finalize(obj);
}
Modified: gnucash/trunk/src/business/business-ledger/gncEntryLedgerControl.c
===================================================================
--- gnucash/trunk/src/business/business-ledger/gncEntryLedgerControl.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/business/business-ledger/gncEntryLedgerControl.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -234,9 +234,7 @@
* then it may have moved. Find out where it is now. */
if (gnc_entry_ledger_find_entry (ledger, new_entry, &vcell_loc))
{
- VirtualCell *vcell;
-
- vcell = gnc_table_get_virtual_cell (ledger->table, vcell_loc);
+ gnc_table_get_virtual_cell (ledger->table, vcell_loc);
new_virt_loc.vcell_loc = vcell_loc;
}
else
@@ -411,7 +409,6 @@
const char *desc;
BasicCell *cell = NULL;
char *account_name = NULL;
- char *new_value = NULL;
g_assert(ledger);
g_assert(ledger->table);
Modified: gnucash/trunk/src/business/business-ledger/gncEntryLedgerLoad.c
===================================================================
--- gnucash/trunk/src/business/business-ledger/gncEntryLedgerLoad.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/business/business-ledger/gncEntryLedgerLoad.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -327,7 +327,6 @@
CellBlock *cursor_header, *cursor;
VirtualCellLocation vcell_loc;
VirtualLocation save_loc;
- time_t present;
gboolean start_primary_color = TRUE;
int new_entry_row = -1;
@@ -517,7 +516,6 @@
vcell_loc.virt_row++;
/* get the current time and reset the dividing row */
- present = gnc_timet_get_today_end ();
table->model->dividing_row_upper = -1;
table->model->dividing_row = -1;
cursor = gnc_table_layout_get_cursor (table->layout, "cursor");
Modified: gnucash/trunk/src/core-utils/gnc-filepath-utils.c
===================================================================
--- gnucash/trunk/src/core-utils/gnc-filepath-utils.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/core-utils/gnc-filepath-utils.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -119,7 +119,6 @@
gchar *
gnc_resolve_file_path (const gchar * filefrag)
{
- int namelen;
gchar *fullpath = NULL, *tmp_path = NULL;
/* seriously invalid */
@@ -136,10 +135,6 @@
if (g_path_is_absolute(filefrag))
return g_strdup (filefrag);
- /* get conservative on the length so that sprintf(getpid()) works ... */
- /* strlen ("/.LCK") + sprintf (%x%d) */
- namelen = strlen (filefrag) + 25;
-
/* Look in the current working directory */
tmp_path = g_get_current_dir();
fullpath = g_build_filename(tmp_path, filefrag, (gchar *)NULL);
Modified: gnucash/trunk/src/core-utils/gnc-uri-utils.c
===================================================================
--- gnucash/trunk/src/core-utils/gnc-uri-utils.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/core-utils/gnc-uri-utils.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -87,7 +87,7 @@
gchar **password,
gchar **path)
{
- gchar **splituri, **spliturl;
+ gchar **splituri;
gchar *url = NULL, *tmpusername = NULL, *tmphostname = NULL;
gchar *delimiter = NULL;
Modified: gnucash/trunk/src/engine/Account.c
===================================================================
--- gnucash/trunk/src/engine/Account.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/engine/Account.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -1799,7 +1799,7 @@
void
xaccAccountMoveAllSplits (Account *accfrom, Account *accto)
{
- AccountPrivate *from_priv, *to_priv;
+ AccountPrivate *from_priv;
/* errors */
g_return_if_fail(GNC_IS_ACCOUNT(accfrom));
@@ -1807,7 +1807,6 @@
/* optimizations */
from_priv = GET_PRIVATE(accfrom);
- to_priv = GET_PRIVATE(accto);
if (!from_priv->splits || accfrom == accto)
return;
@@ -1882,7 +1881,6 @@
gnc_numeric balance;
gnc_numeric cleared_balance;
gnc_numeric reconciled_balance;
- Split *last_split = NULL;
GList *lp;
if (NULL == acc) return;
@@ -1922,7 +1920,6 @@
split->cleared_balance = cleared_balance;
split->reconciled_balance = reconciled_balance;
- last_split = split;
}
priv->balance = balance;
Modified: gnucash/trunk/src/engine/Scrub.c
===================================================================
--- gnucash/trunk/src/engine/Scrub.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/engine/Scrub.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -1008,10 +1008,9 @@
static gnc_commodity *
xaccTransFindCommonCurrency (Transaction *trans, QofBook *book)
{
- gnc_commodity *com_first, *com_scratch;
+ gnc_commodity *com_scratch;
GList *node = NULL;
GSList *comlist = NULL, *found = NULL;
- int score = 0;
if (!trans) return NULL;
Modified: gnucash/trunk/src/engine/Transaction.c
===================================================================
--- gnucash/trunk/src/engine/Transaction.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/engine/Transaction.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -198,7 +198,8 @@
PROP_ENTER_DATE
};
-void check_open (const Transaction *trans)
+void
+check_open (const Transaction *trans)
{
if (trans && 0 >= qof_instance_get_editlevel(trans))
PERR ("transaction %p not open for editing", trans);
Modified: gnucash/trunk/src/engine/TransactionP.h
===================================================================
--- gnucash/trunk/src/engine/TransactionP.h 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/engine/TransactionP.h 2012-05-26 23:47:34 UTC (rev 22203)
@@ -172,7 +172,7 @@
#define xaccTransSetSlots_nc(T,F) qof_instance_set_slots(QOF_INSTANCE(T),F)
void xaccTransRemoveSplit (Transaction *trans, const Split *split);
-G_INLINE_FUNC void check_open (const Transaction *trans);
+void check_open (const Transaction *trans);
/*@}*/
Modified: gnucash/trunk/src/engine/gnc-hooks.c
===================================================================
--- gnucash/trunk/src/engine/gnc-hooks.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/engine/gnc-hooks.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -208,7 +208,7 @@
g_hook_append(gnc_hook->scm_danglers, hook);
LEAVE("");
}
-
+#if 0 /* Not Used */
static gboolean
hook_remove_scm_runner (GHook *hook, gpointer data)
{
@@ -219,7 +219,7 @@
res = scm_equal_p(scm1->proc, scm2->proc);
return(scm_is_true(res));
}
-
+#endif
static void
call_c_hook (GHook *hook, gpointer data)
{
Modified: gnucash/trunk/src/engine/gnc-pricedb.c
===================================================================
--- gnucash/trunk/src/engine/gnc-pricedb.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/engine/gnc-pricedb.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -1580,7 +1580,7 @@
return result;
}
-
+#if 0 /* Not Used */
static void
lookup_day(gpointer key, gpointer val, gpointer user_data)
{
@@ -1603,8 +1603,8 @@
item = item->next;
}
}
+#endif
-
PriceList *
gnc_pricedb_lookup_at_time(GNCPriceDB *db,
const gnc_commodity *c,
@@ -1663,7 +1663,7 @@
LEAVE (" ");
return result;
}
-
+#if 0 /* Not Used */
static void
lookup_time(gpointer key, gpointer val, gpointer user_data)
{
@@ -1686,7 +1686,7 @@
item = item->next;
}
}
-
+#endif
GNCPrice *
gnc_pricedb_lookup_nearest_in_time(GNCPriceDB *db,
const gnc_commodity *c,
@@ -2538,9 +2538,7 @@
static void
pricedb_book_begin (QofBook *book)
{
- GNCPriceDB *db;
-
- db = gnc_pricedb_create(book);
+ gnc_pricedb_create(book);
}
static void
Modified: gnucash/trunk/src/engine/gncIDSearch.c
===================================================================
--- gnucash/trunk/src/engine/gncIDSearch.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/engine/gncIDSearch.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -92,17 +92,14 @@
if (strcmp(type, GNC_CUSTOMER_MODULE_NAME))
{
- GncCustomer *c = NULL;
qof_query_add_term (q, qof_query_build_param_list("CUSTOMER_ID"), string_pred_data, QOF_QUERY_AND);
}
else if (strcmp(type, GNC_INVOICE_MODULE_NAME))
{
- GncInvoice *c = NULL;
qof_query_add_term (q, qof_query_build_param_list("INVOICE_ID"), string_pred_data, QOF_QUERY_AND);
}
else if (strcmp(type, GNC_VENDOR_MODULE_NAME))
{
- GncVendor *c = NULL;
qof_query_add_term (q, qof_query_build_param_list("VENDOR_ID"), string_pred_data, QOF_QUERY_AND);
}
Modified: gnucash/trunk/src/engine/gncInvoice.c
===================================================================
--- gnucash/trunk/src/engine/gncInvoice.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/engine/gncInvoice.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -954,7 +954,6 @@
gboolean gncInvoiceGetIsCreditNote (const GncInvoice *invoice)
{
- gint64 is_cn;
if (!invoice) return FALSE;
if (kvp_frame_get_gint64(invoice->inst.kvp_data, GNC_INVOICE_IS_CN))
return TRUE;
@@ -1710,7 +1709,7 @@
gnc_numeric exch, Timespec date,
const char *memo, const char *num)
{
- GNCLot *payment_lot, *invoice_lot;
+ GNCLot *payment_lot;
GList *selected_lots = NULL;
const GncOwner *owner;
Modified: gnucash/trunk/src/engine/gncJob.c
===================================================================
--- gnucash/trunk/src/engine/gncJob.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/engine/gncJob.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -475,14 +475,6 @@
return c->name;
}
-static void
-destroy_job_on_book_close(QofInstance *ent, gpointer data)
-{
- GncJob* job = GNC_JOB(ent);
-
- gncJobFree(job);
-}
-
static QofObject gncJobDesc =
{
DI(.interface_version = ) QOF_OBJECT_VERSION,
Modified: gnucash/trunk/src/engine/policy.c
===================================================================
--- gnucash/trunk/src/engine/policy.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/engine/policy.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -195,7 +195,7 @@
* I'm not sure I got it right.
*/
-static GNCLot *
+G_GNUC_UNUSED static GNCLot *
LIFOPolicyGetLot (GNCPolicy *pcy, Split *split)
{
if (!split) return NULL;
@@ -203,14 +203,14 @@
split->parent->common_currency);
}
-static Split *
+G_GNUC_UNUSED static Split *
LIFOPolicyGetSplit (GNCPolicy *pcy, GNCLot *lot)
{
return DirectionPolicyGetSplit (pcy, lot, 1);
}
/* This routine is actually identical to FIFO... */
-static void
+G_GNUC_UNUSED static void
LIFOPolicyGetLotOpening (GNCPolicy *pcy,
GNCLot *lot,
gnc_numeric *ret_amount, gnc_numeric *ret_value,
@@ -225,7 +225,7 @@
}
/* This routine is actually identical to FIFO... */
-static gboolean
+G_GNUC_UNUSED static gboolean
LIFOPolicyIsOpeningSplit (GNCPolicy *pcy, GNCLot *lot, Split *split)
{
Split *opening_split;
Modified: gnucash/trunk/src/engine/test/test-account-object.c
===================================================================
--- gnucash/trunk/src/engine/test/test-account-object.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/engine/test/test-account-object.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -40,7 +40,7 @@
QofSession *sess;
QofBook *book;
Account *acc;
- gnc_numeric *start, *end, end2, delta, zero, five;
+ gnc_numeric *start, *end, end2, delta, five;
sess = get_random_session ();
book = qof_session_get_book (sess);
@@ -80,8 +80,6 @@
int
main (int argc, char **argv)
{
- gint i;
-
qof_init();
if (!cashobjects_register())
exit(1);
Modified: gnucash/trunk/src/engine/test/test-guid.c
===================================================================
--- gnucash/trunk/src/engine/test/test-guid.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/engine/test/test-guid.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -55,7 +55,7 @@
int i;
QofSession *sess;
QofBook *book;
- QofInstance *ent, *eblk[NENT];
+ QofInstance *ent;
QofCollection *col;
QofIdType type;
GncGUID guid;
@@ -70,7 +70,6 @@
for (i = 0; i < NENT; i++)
{
ent = g_object_new(QOF_TYPE_INSTANCE, NULL);
- eblk[i] = ent;
guid_new(&guid);
ent = g_object_new(QOF_TYPE_INSTANCE, "guid", &guid, NULL);
do_test ((NULL == qof_collection_lookup_entity (col, &guid)),
Modified: gnucash/trunk/src/engine/test/test-transaction-reversal.c
===================================================================
--- gnucash/trunk/src/engine/test/test-transaction-reversal.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/engine/test/test-transaction-reversal.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -53,7 +53,7 @@
{
Account *acc1, *acc2;
Transaction *transaction, *new_trans;
- gnc_numeric old, new, result;
+ gnc_numeric old, new;
QofBook *book;
char *msg;
int i;
@@ -93,7 +93,6 @@
{
old = xaccSplitGetAmount(xaccTransGetSplit(transaction, i));
new = xaccSplitGetAmount(xaccTransGetSplit(new_trans, i));
- result = gnc_numeric_add(old, new, GNC_DENOM_AUTO, GNC_HOW_DENOM_FIXED);
if (gnc_numeric_eq(old, gnc_numeric_neg(new)))
{
msg = g_strdup_printf("Amount of split %d wrong after reversal\n", i);
@@ -102,7 +101,6 @@
old = xaccSplitGetValue(xaccTransGetSplit(transaction, i));
new = xaccSplitGetValue(xaccTransGetSplit(new_trans, i));
- result = gnc_numeric_add(old, new, GNC_DENOM_AUTO, GNC_HOW_DENOM_FIXED);
if (gnc_numeric_eq(old, gnc_numeric_neg(new)))
{
msg = g_strdup_printf("Value of split %d wrong after reversal\n", i);
Modified: gnucash/trunk/src/engine/test/test-vendor.c
===================================================================
--- gnucash/trunk/src/engine/test/test-vendor.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/engine/test/test-vendor.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -61,8 +61,6 @@
static void
test_vendor (void)
{
- QofBackend *be;
- QofSession *session;
QofBook *book;
GncVendor *vendor;
Modified: gnucash/trunk/src/engine/test/utest-Account.c
===================================================================
--- gnucash/trunk/src/engine/test/utest-Account.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/engine/test/utest-Account.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -366,7 +366,7 @@
static void
teardown ( Fixture *fixture, gconstpointer pData)
{
- Account *parent = NULL, *child = fixture->acct;
+ Account *child = fixture->acct;
qof_book_destroy (gnc_account_get_book (child));
/* No need to free the last account, qof_book_destroy did that */
g_free (fixture->func);
@@ -695,7 +695,6 @@
QofBook *book = qof_book_new ();
Account *acc;
TestSignal signal = test_signal_new (NULL, QOF_EVENT_CREATE, NULL);
- gpointer handler_data = (gpointer)0xabcdef;
acc = xaccMallocAccount (book);
g_assert (acc != NULL);
test_signal_assert_hits (signal, 1);
@@ -839,7 +838,6 @@
guint loglevel = G_LOG_LEVEL_CRITICAL | G_LOG_FLAG_FATAL;
TestErrorStruct check1 = { loglevel, "gnc.account", msg1, 0 };
TestErrorStruct check2 = { loglevel, "gnc.engine", msg2, 0 };
- GLogLevelFlags oldmask1, oldmask2;
QofBook *book = gnc_account_get_book (fixture->acct);
Account *parent = gnc_account_get_parent (fixture->acct);
AccountPrivate *p_priv = fixture->func->get_private (parent);
@@ -1055,7 +1053,6 @@
Split *split3 = xaccMallocSplit (book);
TestSignal sig1, sig2, sig3;
AccountPrivate *priv = fixture->func->get_private (fixture->acct);
- gint hdlr1, hdlr2, hdlr3;
gchar *msg1 = "gnc_account_insert_split: assertion `GNC_IS_ACCOUNT(acc)' failed";
gchar *msg2 = "gnc_account_insert_split: assertion `GNC_IS_SPLIT(s)' failed";
guint loglevel = G_LOG_LEVEL_CRITICAL | G_LOG_FLAG_FATAL;
@@ -1696,7 +1693,6 @@
gchar *names2 = "income:exempt:int";
gchar *names3 = "expense:taxable:int";
gchar *code;
- AccountTestFunctions *func = _utest_account_fill_functions ();
root = gnc_account_get_root (fixture->acct);
target = gnc_account_lookup_by_full_name (root, names1);
@@ -2317,24 +2313,25 @@
test_gnc_account_merge_children (Fixture *fixture, gconstpointer pData)
{
Account *root = gnc_account_get_root (fixture->acct);
- Account *stocks = gnc_account_lookup_by_name (root, "stocks");
- Account *baz = gnc_account_lookup_by_name (root, "baz");
- Account *baz2 = gnc_account_lookup_by_name (root, "baz2");
Account *taxable = gnc_account_lookup_by_name (root, "taxable");
Account *expense = gnc_account_lookup_by_name (root, "expense");
Account *div = gnc_account_lookup_by_name (root, "div");
Account *div1 = gnc_account_lookup_by_name (root, "div1");
- gint stocks_desc = gnc_account_n_descendants (stocks);
gint taxable_desc = gnc_account_n_descendants (taxable);
gint expense_desc = gnc_account_n_descendants (expense);
+ TestSignal sig4, sig5;
+ /* This segment doesn't test because of problems with resetting
+ * the accounts on the splits. It will have to be rewritten with a
+ * mock Split object
+ Account *stocks = gnc_account_lookup_by_name (root, "stocks");
+ Account *baz = gnc_account_lookup_by_name (root, "baz");
+ Account *baz2 = gnc_account_lookup_by_name (root, "baz2");
+ gint stocks_desc = gnc_account_n_descendants (stocks);
gfloat stocks_balance = gnc_numeric_to_double (
xaccAccountGetBalance (stocks));
gfloat baz_balance = gnc_numeric_to_double (xaccAccountGetBalance (baz));
gfloat baz2_balance = gnc_numeric_to_double (xaccAccountGetBalance (baz2));
- TestSignal sig1, sig2, sig3, sig4, sig5;
- /* This segment doesn't test because of problems with resetting
- * the accounts on the splits. It will have to be rewritten with a
- * mock Split object
+ TestSignal sig1, sig2, sig3;
gchar *logdomain = "gnc.engine";
gint loglevel = G_LOG_LEVEL_CRITICAL | G_LOG_FLAG_FATAL;
gchar *msg = "[xaccSplitCommitEdit ()] Account grabbed split prematurely.";
Modified: gnucash/trunk/src/engine/test/utest-Invoice.c
===================================================================
--- gnucash/trunk/src/engine/test/utest-Invoice.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/engine/test/utest-Invoice.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -41,9 +41,7 @@
static void
setup( Fixture *fixture, gconstpointer pData )
{
- Account *root;
fixture->book = qof_book_new();
- root = gnc_account_create_root (fixture->book);
fixture->account = xaccMallocAccount(fixture->book);
fixture->commodity = gnc_commodity_new(fixture->book, "foo", "bar", "xy", "xy", 100);
Modified: gnucash/trunk/src/engine/test/utest-Split.c
===================================================================
--- gnucash/trunk/src/engine/test/utest-Split.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/engine/test/utest-Split.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -393,6 +393,7 @@
g_assert_cmpint (fixture->func->xaccSplitEqualCheckBal ("test ", foo, bar), ==, FALSE);
g_assert_cmpint (check.hits, ==, 2);
g_log_remove_handler ("gnc.engine", hdlr);
+ g_log_set_default_handler (oldlogger, NULL);
test_clear_error_list ();
}
@@ -410,10 +411,10 @@
gchar *msg02 = "[xaccSplitEqual()] GUIDs differ";
gchar *msg03;
gchar *msg04 = "[xaccSplitEqual()] actions differ: foo vs bar";
- gchar *msg05 = "[xaccSplitEqual()] kvp frames: differ foo vs bar";
- gchar *msg06 = "[xaccSplitEqual()] reconcile flags differ: foo vs bar";
- gchar *msg07 = "[xaccSplitEqual()] reconciled date differs";
- gchar *msg08 = "[xaccSplitEqual()] amounts differ: foo vs bar";
+ G_GNUC_UNUSED gchar *msg05 = "[xaccSplitEqual()] kvp frames: differ foo vs bar";
+ G_GNUC_UNUSED gchar *msg06 = "[xaccSplitEqual()] reconcile flags differ: foo vs bar";
+ G_GNUC_UNUSED gchar *msg07 = "[xaccSplitEqual()] reconciled date differs";
+ G_GNUC_UNUSED gchar *msg08 = "[xaccSplitEqual()] amounts differ: foo vs bar";
gchar *msg10 = "[xaccSplitEqual()] transactions differ";
gchar *msg11 = "[xaccTransEqual()] one is NULL";
gchar *msg12 = "[xaccSplitEqualCheckBal()] balances differ: 321/1000 vs 0/1";
@@ -522,6 +523,7 @@
g_object_unref (split1);
g_object_unref (split2);
test_clear_error_list ();
+ g_log_set_default_handler (oldlogger, NULL);
g_free (msg03);
}
/* xaccSplitGetAccount
@@ -1051,6 +1053,7 @@
test_destroy (gnaira);
test_destroy (gncxx);
test_destroy (gnm);
+ g_log_set_default_handler (oldlogger, NULL);
g_free (check.msg);
}
/* xaccSplitDestroy
@@ -1283,7 +1286,7 @@
Account *acc1 = xaccMallocAccount (book);
Account *acc2 = xaccMallocAccount (book);
- gchar *name1 = "waldo", *name2 = "pepper", fullname[32], *result;
+ gchar *name1 = "waldo", *name2 = "pepper", *result;
gchar *err = "-- Split Transaction --";
xaccAccountSetCommodity (acc2, fixture->curr);
@@ -1360,7 +1363,6 @@
Account *acc2 = xaccMallocAccount (book);
gchar *name1 = "waldo", *name2 = "pepper";
- gchar *err = "-- Split Transaction --";
xaccAccountSetCommodity (acc2, fixture->curr);
gnc_account_append_child (acc1, acc2);
@@ -1563,6 +1565,7 @@
test_signal_free (sig1);
test_signal_free (sig2);
+ g_log_set_default_handler (oldlogger, NULL);
/* txn already destroyed by xaccTransCommitEdit() */
}
/* xaccSplitGetSharePrice
@@ -1682,7 +1685,6 @@
test_xaccSplitMakeStockSplit (Fixture *fixture, gconstpointer pData)
{
Split *split = fixture->split;
- Transaction *txn = split->parent;
g_assert_cmpstr (xaccSplitGetType (split), ==, "normal");
xaccSplitMakeStockSplit (split);
Modified: gnucash/trunk/src/engine/test-core/test-engine-stuff.c
===================================================================
--- gnucash/trunk/src/engine/test-core/test-engine-stuff.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/engine/test-core/test-engine-stuff.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -916,7 +916,7 @@
{
Account *acc, *bcc;
Split *s;
- gnc_numeric val, amt;
+ gnc_numeric val;
/* Gotta have at least two different accounts */
if (1 >= g_list_length (account_list)) return;
@@ -949,23 +949,6 @@
}
val = gnc_numeric_neg(val);
xaccSplitSetValue(s, val);
-
- if (gnc_commodity_equal (xaccTransGetCurrency(trn),
- xaccAccountGetCommodity(bcc)) &&
- (!do_bork()))
- {
- amt = val;
- }
- else
- {
- gnc_numeric amt2 = xaccSplitGetAmount(s);
- if (gnc_numeric_positive_p(amt2) ^ gnc_numeric_positive_p(val))
- amt = gnc_numeric_neg(amt2);
- }
-
- if (gnc_numeric_zero_p(val))
- amt = val;
-
xaccSplitSetAmount(s, val);
xaccTransCommitEdit(trn);
}
@@ -1940,10 +1923,9 @@
while (num_transactions--)
{
gnc_commodity *com;
- Transaction *trans;
com = get_random_commodity_from_table (table);
- trans = get_random_transaction_with_currency (book, com, accounts);
+ get_random_transaction_with_currency (book, com, accounts);
}
g_list_free (accounts);
}
Modified: gnucash/trunk/src/gnome/assistant-acct-period.c
===================================================================
--- gnucash/trunk/src/gnome/assistant-acct-period.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/gnome/assistant-acct-period.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -237,7 +237,6 @@
ap_assistant_prepare (GtkAssistant *assistant, GtkWidget *page,
gpointer user_data)
{
- AcctPeriodInfo *info = user_data;
gint currentpage = gtk_assistant_get_current_page(assistant);
switch (currentpage)
@@ -467,16 +466,12 @@
GtkTextBuffer * buffer;
GtkTextIter startiter, enditer;
gint len;
- QofBook *closed_book = NULL, *current_book;
const char *btitle;
char *bnotes;
Timespec closing_date;
- KvpFrame *book_frame;
ENTER("info=%p", info);
- current_book = gnc_get_current_book ();
-
btitle = gtk_entry_get_text (GTK_ENTRY(info->book_title));
buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(info->book_notes));
len = gtk_text_buffer_get_char_count (buffer);
@@ -647,15 +642,13 @@
gnc_acct_period_dialog (void)
{
AcctPeriodInfo *info;
- gint component_id;
info = g_new0 (AcctPeriodInfo, 1);
ap_assistant_create (info);
- component_id = gnc_register_gui_component (ASSISTANT_ACCT_PERIOD_CM_CLASS,
- NULL, ap_close_handler,
- info);
+ gnc_register_gui_component (ASSISTANT_ACCT_PERIOD_CM_CLASS,
+ NULL, ap_close_handler, info);
gtk_widget_show_all (info->window);
Modified: gnucash/trunk/src/gnome/assistant-hierarchy.c
===================================================================
--- gnucash/trunk/src/gnome/assistant-hierarchy.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/gnome/assistant-hierarchy.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -436,8 +436,6 @@
void on_prepare (GtkAssistant *assistant, GtkWidget *page,
hierarchy_data *data)
{
- gint currentpage = gtk_assistant_get_current_page(assistant);
-
switch (gtk_assistant_get_current_page(assistant))
{
case 2:
@@ -449,7 +447,6 @@
on_final_account_prepare (data);
break;
}
-
}
void
@@ -1065,9 +1062,8 @@
hierarchy_data *data;
GtkWidget *dialog;
GtkTreeView *tree_view;
- GtkWidget *box, *start_page;
+ GtkWidget *box;
GtkBuilder *builder;
- GdkColor *color;
data = g_new0 (hierarchy_data, 1);
builder = gtk_builder_new();
Modified: gnucash/trunk/src/gnome/assistant-loan.c
===================================================================
--- gnucash/trunk/src/gnome/assistant-loan.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/gnome/assistant-loan.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -1353,7 +1353,6 @@
loan_rep_page_complete( GtkAssistant *assistant, gpointer user_data )
{
LoanAssistantData *ldd = user_data;
- int i;
ldd->ld.repFromAcct =
gnc_account_sel_get_account( ldd->repAssetsFromGAS );
@@ -1382,7 +1381,6 @@
loan_rep_page_save( GtkAssistant *assistant, gpointer user_data )
{
LoanAssistantData *ldd = user_data;
- int i;
if ( ldd->ld.repMemo )
g_free( ldd->ld.repMemo );
@@ -3139,7 +3137,6 @@
loan_assistant_prepare (GtkAssistant *assistant, GtkWidget *page,
gpointer user_data)
{
- LoanAssistantData *ldd = user_data;
gint currentpage = gtk_assistant_get_current_page(assistant);
switch (currentpage)
Modified: gnucash/trunk/src/gnome/assistant-stock-split.c
===================================================================
--- gnucash/trunk/src/gnome/assistant-stock-split.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/gnome/assistant-stock-split.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -252,7 +252,6 @@
void gnc_stock_split_assistant_prepare (GtkAssistant *assistant, GtkWidget *page,
gpointer user_data)
{
- StockSplitInfo *info = user_data;
gint currentpage = gtk_assistant_get_current_page(assistant);
switch (currentpage)
@@ -289,7 +288,6 @@
gpointer user_data)
{
StockSplitInfo *info = user_data;
- GtkTreeSelection *selection;
gtk_widget_grab_focus(info->cash_edit);
@@ -629,9 +627,7 @@
GtkWidget *box;
GtkWidget *amount;
GtkWidget *date;
- GtkWidget *ce;
GtkWidget *label;
- GtkWidget *button;
info->description_entry = GTK_WIDGET(gtk_builder_get_object(builder, "description_entry"));
@@ -681,7 +677,6 @@
GtkWidget *amount;
GtkWidget *label;
GtkWidget *scroll;
- GtkWidget *button;
GtkTreeSelection *selection;
box = GTK_WIDGET(gtk_builder_get_object(builder, "cash_box"));
@@ -756,8 +751,6 @@
{
StockSplitInfo *info = user_data;
Account *old_account;
- GtkWidget *page;
- GtkBuilder *builder;
old_account = info->acct;
Modified: gnucash/trunk/src/gnome/dialog-commodities.c
===================================================================
--- gnucash/trunk/src/gnome/dialog-commodities.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/gnome/dialog-commodities.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -122,7 +122,6 @@
GList *node;
GList *prices;
GList *accounts;
- gboolean do_delete;
gboolean can_delete;
gnc_commodity *commodity;
GtkWidget *dialog;
@@ -135,7 +134,6 @@
accounts = gnc_account_get_descendants (gnc_book_get_root_account(cd->book));
can_delete = TRUE;
- do_delete = FALSE;
for (node = accounts; node; node = node->next)
{
Modified: gnucash/trunk/src/gnome/dialog-lot-viewer.c
===================================================================
--- gnucash/trunk/src/gnome/dialog-lot-viewer.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/gnome/dialog-lot-viewer.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -502,7 +502,6 @@
Transaction *trans = xaccSplitGetParent (split);
time_t date = xaccTransGetDate (trans);
gnc_numeric amnt, valu, gains;
- int row;
/* Do not show gains splits */
if (gnc_numeric_zero_p (xaccSplitGetAmount(split))) continue;
@@ -609,7 +608,6 @@
lv_close_handler (gpointer user_data)
{
GNCLotViewer *lv = user_data;
- GNCLot *lot = lv->selected_lot;
lv_save_current_lot (lv);
@@ -699,8 +697,6 @@
static void
lv_remove_split_from_lot_cb (GtkWidget *widget, GNCLotViewer * lv)
{
- GncInvoice *lot_invoice, *txn_invoice;
- Transaction *txn;
Split *split;
if ( NULL == lv->selected_lot ) return;
Modified: gnucash/trunk/src/gnome/dialog-price-editor.c
===================================================================
--- gnucash/trunk/src/gnome/dialog-price-editor.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/gnome/dialog-price-editor.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -54,7 +54,7 @@
/* This static indicates the debugging module that this .o belongs to. */
-static QofLogModule log_module = GNC_MOD_GUI;
+G_GNUC_UNUSED static QofLogModule log_module = GNC_MOD_GUI;
typedef struct
Modified: gnucash/trunk/src/gnome/dialog-print-check.c
===================================================================
--- gnucash/trunk/src/gnome/dialog-print-check.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/gnome/dialog-print-check.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -61,7 +61,7 @@
/* This static indicates the debugging module that this .o belongs to.
*/
-static QofLogModule log_module = "gnc.printing.checks";
+G_GNUC_UNUSED static QofLogModule log_module = "gnc.printing.checks";
#define GCONF_SECTION "dialogs/print_checks"
#define KEY_CHECK_FORMAT_GUID "check_format_guid"
@@ -804,7 +804,6 @@
GncGUID guid;
char buf[GUID_ENCODING_LENGTH+1];
gchar *filename, *pathname;
- GtkTreeModel *model;
multip = pcd_get_custom_multip(pcd);
@@ -851,7 +850,6 @@
/* Reload the format combo box and reselect the "custom" entry */
initialize_format_combobox(pcd);
- model = gtk_combo_box_get_model(GTK_COMBO_BOX(pcd->format_combobox));
gtk_combo_box_set_active(GTK_COMBO_BOX(pcd->format_combobox),
pcd->format_max - 1);
}
@@ -1653,7 +1651,6 @@
GtkWindow *window;
gchar *font;
Transaction *trans = NULL;
- Split *split;
pcd = g_new0(PrintCheckDialog, 1);
pcd->plugin_page = plugin_page;
@@ -1853,7 +1850,6 @@
gint layout_height, layout_width;
gdouble width, height;
gchar *new_text;
- CheckItemType ct;
if ((NULL == text) || (strlen(text) == 0))
return 0.0;
@@ -2051,10 +2047,10 @@
PangoFontDescription *date_desc;
check_item_t date_item;
gchar *text = NULL, *expanded = NULL;
- const gchar *thislocale, *c;
+ const gchar *c;
GString *cdn_fmt;
- thislocale = setlocale(LC_ALL, NULL);
+ setlocale(LC_ALL, NULL);
if ( !data->print_date_format ) return;
date_desc = pango_font_description_copy_static(default_desc);
@@ -2633,7 +2629,6 @@
gint pnum;
guint check_count;
gint first_page_max, first_page_min, first_page_value;
- gdouble fpmin, fpmax;
pnum = gtk_combo_box_get_active(GTK_COMBO_BOX(pcd->position_combobox));
Modified: gnucash/trunk/src/gnome/dialog-sx-editor.c
===================================================================
--- gnucash/trunk/src/gnome/dialog-sx-editor.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/gnome/dialog-sx-editor.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -784,14 +784,11 @@
// @@FIXME: similar to below, check the commodities involved, and disallow autocreation
{
- gboolean autocreateState, notifyState;
+ gboolean autocreateState;
autocreateState =
- gtk_toggle_button_get_active(
- GTK_TOGGLE_BUTTON(sxed->autocreateOpt) );
- notifyState =
- gtk_toggle_button_get_active(
- GTK_TOGGLE_BUTTON(sxed->notifyOpt) );
+ gtk_toggle_button_get_active (
+ GTK_TOGGLE_BUTTON(sxed->autocreateOpt));
if (((ttVarCount > 0) || multi_commodity) && autocreateState)
{
@@ -997,7 +994,6 @@
/* start date and freq spec */
{
GDate gdate;
- GString *str;
GList *schedule = NULL;
gnc_frequency_save_to_recurrence(sxed->gncfreq, &schedule, &gdate);
@@ -1120,8 +1116,8 @@
* Create the Schedule Editor Dialog *
************************************/
GncSxEditorDialog *
-gnc_ui_scheduled_xaction_editor_dialog_create(SchedXaction *sx,
- gboolean newSX)
+gnc_ui_scheduled_xaction_editor_dialog_create (SchedXaction *sx,
+ gboolean newSX)
{
GncSxEditorDialog *sxed;
GtkBuilder *builder;
@@ -1566,8 +1562,6 @@
if (gnc_verify_dialog(sxed->dialog, TRUE, "%s", message))
{
- Transaction *trans;
- trans = gnc_split_register_get_current_trans( reg );
if ( !gnc_split_register_save( reg, TRUE ) )
return;
Modified: gnucash/trunk/src/gnome/dialog-sx-from-trans.c
===================================================================
--- gnucash/trunk/src/gnome/dialog-sx-from-trans.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/gnome/dialog-sx-from-trans.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -281,7 +281,6 @@
sxftd_update_schedule( SXFromTransInfo *sxfti, GDate *date, GList **recurrences)
{
gint index;
- GtkWidget *w;
/* Note that we make the start date the *NEXT* instance, not the
* present one. */
@@ -449,7 +448,6 @@
static guint
sxftd_compute_sx(SXFromTransInfo *sxfti)
{
- GtkWidget *w;
gchar *name;
GDate date;
GList *schedule = NULL;
@@ -607,11 +605,9 @@
sxftd_advanced_clicked(SXFromTransInfo *sxfti)
{
guint sx_error = sxftd_compute_sx(sxfti);
- GncSxEditorDialog *adv_edit_dlg;
GMainContext *context;
- if ( sx_error != 0
- && sx_error != SXFTD_ERRNO_UNBALANCED_XACTION )
+ if ( sx_error != 0 && sx_error != SXFTD_ERRNO_UNBALANCED_XACTION )
{
// unbalanced-xaction is "okay", since this is also checked for by
// the advanced editor.
@@ -623,9 +619,7 @@
context = g_main_context_default();
while (g_main_context_iteration(context, FALSE));
- adv_edit_dlg =
- gnc_ui_scheduled_xaction_editor_dialog_create(sxfti->sx,
- TRUE /* newSX */);
+ gnc_ui_scheduled_xaction_editor_dialog_create(sxfti->sx, TRUE /* newSX */);
/* close ourself, since advanced editing entails us, and there are sync
* issues otherwise. */
sxftd_close(sxfti, FALSE);
@@ -714,7 +708,6 @@
recurrenceListNextInstance(schedule, &date, &nextDate);
{
- GtkWidget *w;
gchar *name;
/* get the name */
name = NULL;
Modified: gnucash/trunk/src/gnome/dialog-sx-since-last-run.c
===================================================================
--- gnucash/trunk/src/gnome/dialog-sx-since-last-run.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/gnome/dialog-sx-since-last-run.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -55,7 +55,7 @@
#undef G_LOG_DOMAIN
#define G_LOG_DOMAIN "gnc.gui.sx.slr"
-static QofLogModule log_module = GNC_MOD_GUI_SX;
+G_GNUC_UNUSED static QofLogModule log_module = GNC_MOD_GUI_SX;
#define DIALOG_SX_SINCE_LAST_RUN_CM_CLASS "dialog-sx-since-last-run"
#define GCONF_SECTION "dialogs/scheduled_trans/since_last_run"
Modified: gnucash/trunk/src/gnome/dialog-tax-info.c
===================================================================
--- gnucash/trunk/src/gnome/dialog-tax-info.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/gnome/dialog-tax-info.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -1298,7 +1298,6 @@
gnc_tax_info_dialog_create (GtkWidget * parent, TaxInfoDialog *ti_dialog)
{
GtkWidget *dialog;
- GtkObject *tido;
GtkBuilder *builder;
GtkTreeView *tree_view;
GtkTreeSelection *selection;
@@ -1310,7 +1309,6 @@
dialog = GTK_WIDGET(gtk_builder_get_object (builder, "Tax Information Dialog"));
ti_dialog->dialog = dialog;
- tido = GTK_OBJECT (dialog);
initialize_getters ();
Modified: gnucash/trunk/src/gnome/gnc-plugin-account-tree.c
===================================================================
--- gnucash/trunk/src/gnome/gnc-plugin-account-tree.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/gnome/gnc-plugin-account-tree.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -177,14 +177,8 @@
static void
gnc_plugin_account_tree_finalize (GObject *object)
{
- GncPluginAccountTree *plugin;
- GncPluginAccountTreePrivate *priv;
-
g_return_if_fail (GNC_IS_PLUGIN_ACCOUNT_TREE (object));
- plugin = GNC_PLUGIN_ACCOUNT_TREE (object);
- priv = GNC_PLUGIN_ACCOUNT_TREE_GET_PRIVATE (object);
-
G_OBJECT_CLASS (parent_class)->finalize (object);
}
Modified: gnucash/trunk/src/gnome/gnc-plugin-basic-commands.c
===================================================================
--- gnucash/trunk/src/gnome/gnc-plugin-basic-commands.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/gnome/gnc-plugin-basic-commands.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -58,7 +58,7 @@
#include "gnc-plugin-file-history.h"
/* This static indicates the debugging module that this .o belongs to. */
-static QofLogModule log_module = GNC_MOD_GUI;
+G_GNUC_UNUSED static QofLogModule log_module = GNC_MOD_GUI;
static void gnc_plugin_basic_commands_class_init (GncPluginBasicCommandsClass *klass);
static void gnc_plugin_basic_commands_init (GncPluginBasicCommands *plugin);
@@ -78,7 +78,11 @@
static void gnc_main_window_cmd_actions_mortgage_loan (GtkAction *action, GncMainWindowActionData *data);
static void gnc_main_window_cmd_actions_scheduled_transaction_editor (GtkAction *action, GncMainWindowActionData *data);
static void gnc_main_window_cmd_actions_since_last_run (GtkAction *action, GncMainWindowActionData *data);
+
+#if CLOSE_BOOKS_ACTUALLY_WORKS
static void gnc_main_window_cmd_actions_close_books (GtkAction *action, GncMainWindowActionData *data);
+#endif /* CLOSE_BOOKS_ACTUALLY_WORKS */
+
static void gnc_main_window_cmd_tools_financial_calculator (GtkAction *action, GncMainWindowActionData *data);
static void gnc_main_window_cmd_tools_close_book (GtkAction *action, GncMainWindowActionData *data);
static void gnc_main_window_cmd_tools_find_transactions (GtkAction *action, GncMainWindowActionData *data);
@@ -411,14 +415,8 @@
static void
gnc_plugin_basic_commands_finalize (GObject *object)
{
- GncPluginBasicCommands *plugin;
- GncPluginBasicCommandsPrivate *priv;
-
g_return_if_fail (GNC_IS_PLUGIN_BASIC_COMMANDS (object));
- plugin = GNC_PLUGIN_BASIC_COMMANDS (object);
- priv = GNC_PLUGIN_BASIC_COMMANDS_GET_PRIVATE (plugin);
-
G_OBJECT_CLASS (parent_class)->finalize (object);
}
@@ -586,12 +584,13 @@
{
gnc_ui_sx_loan_assistant_create ();
}
-
+#ifdef CLOSE_BOOKS_ACTUALLY_WORKS
static void
gnc_main_window_cmd_actions_close_books (GtkAction *action, GncMainWindowActionData *data)
{
gnc_acct_period_dialog();
}
+#endif /* CLOSE_BOOKS_ACTUALLY_WORKS */
static void
gnc_main_window_cmd_tools_price_editor (GtkAction *action, GncMainWindowActionData *data)
Modified: gnucash/trunk/src/gnome/gnc-plugin-budget.c
===================================================================
--- gnucash/trunk/src/gnome/gnc-plugin-budget.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/gnome/gnc-plugin-budget.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -154,15 +154,9 @@
static void
gnc_plugin_budget_finalize(GObject *object)
{
- GncPluginBudget *plugin;
- GncPluginBudgetPrivate *priv;
-
g_return_if_fail(GNC_IS_PLUGIN_BUDGET (object));
ENTER(" ");
- plugin = GNC_PLUGIN_BUDGET(object);
- priv = GNC_PLUGIN_BUDGET_GET_PRIVATE(plugin);
-
(parent_class->finalize)(object);
LEAVE(" ");
Modified: gnucash/trunk/src/gnome/gnc-plugin-page-account-tree.c
===================================================================
--- gnucash/trunk/src/gnome/gnc-plugin-page-account-tree.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/gnome/gnc-plugin-page-account-tree.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -477,11 +477,7 @@
static void
gnc_plugin_page_account_tree_close_cb (gpointer user_data)
{
- GncPluginPage *plugin_page;
- GncPluginPageAccountTree *page;
-
- plugin_page = GNC_PLUGIN_PAGE(user_data);
- page = GNC_PLUGIN_PAGE_ACCOUNT_TREE (plugin_page);
+ GncPluginPage *plugin_page = GNC_PLUGIN_PAGE(user_data);
gnc_main_window_close_page(plugin_page);
}
@@ -749,12 +745,11 @@
GdkEventButton *event,
GncPluginPage *page)
{
- gboolean result;
g_return_val_if_fail(GNC_IS_PLUGIN_PAGE(page), FALSE);
ENTER("widget %p, event %p, page %p", widget, event, page);
- result = gnc_main_window_button_press_cb(widget, event, page);
+ gnc_main_window_button_press_cb(widget, event, page);
LEAVE(" ");
/* Always return FALSE. This will let the tree view callback run as
@@ -769,14 +764,12 @@
Account *account,
gboolean include_subs)
{
- GncPluginPageAccountTreePrivate *priv;
GtkWidget *window;
GncPluginPage *new_page;
if (account == NULL)
return;
- priv = GNC_PLUGIN_PAGE_ACCOUNT_TREE_GET_PRIVATE(page);
window = GNC_PLUGIN_PAGE (page)->window;
new_page = gnc_plugin_page_register_new (account, include_subs);
gnc_main_window_open_page (GNC_MAIN_WINDOW(window), new_page);
Modified: gnucash/trunk/src/gnome/gnc-plugin-page-budget.c
===================================================================
--- gnucash/trunk/src/gnome/gnc-plugin-page-budget.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/gnome/gnc-plugin-page-budget.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -493,12 +493,10 @@
static void
gnc_plugin_page_budget_destroy_widget (GncPluginPage *plugin_page)
{
- GncPluginPageBudget *page;
GncPluginPageBudgetPrivate *priv;
gchar *priv_gconf_section = NULL;
ENTER("page %p", plugin_page);
- page = GNC_PLUGIN_PAGE_BUDGET (plugin_page);
priv = GNC_PLUGIN_PAGE_BUDGET_GET_PRIVATE(plugin_page);
if (priv->delete_budget)
Modified: gnucash/trunk/src/gnome/gnc-plugin-page-register.c
===================================================================
--- gnucash/trunk/src/gnome/gnc-plugin-page-register.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/gnome/gnc-plugin-page-register.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -554,7 +554,6 @@
GncPluginPageRegisterPrivate *priv;
GncPluginPage *plugin_page;
GNCSplitReg *gsr;
- SplitRegister *reg;
const GList *item;
GList *book_list;
gchar *label;
@@ -599,10 +598,6 @@
gnc_plugin_page_add_book (plugin_page, (QofBook *)item->data);
// Do not free the list. It is owned by the query.
- reg = gnc_ledger_display_get_split_register(priv->ledger);
-
-
-
priv->component_manager_id = 0;
return plugin_page;
}
@@ -716,14 +711,9 @@
static void
gnc_plugin_page_register_finalize (GObject *object)
{
- GncPluginPageRegister *page;
- GncPluginPageRegisterPrivate *priv;
-
g_return_if_fail (GNC_IS_PLUGIN_PAGE_REGISTER (object));
ENTER("object %p", object);
- page = GNC_PLUGIN_PAGE_REGISTER (object);
- priv = GNC_PLUGIN_PAGE_REGISTER_GET_PRIVATE (page);
G_OBJECT_CLASS (parent_class)->finalize (object);
LEAVE(" ");
@@ -1181,7 +1171,6 @@
GKeyFile *key_file,
const gchar *group_name)
{
- GncPluginPageRegisterPrivate *priv;
GtkAction *action;
GError *error = NULL;
gchar *style_name;
@@ -1189,7 +1178,6 @@
gboolean use_double_line;
ENTER(" ");
- priv = GNC_PLUGIN_PAGE_REGISTER_GET_PRIVATE(page);
/* Convert the style name to an index */
style_name = g_key_file_get_string(key_file, group_name,
@@ -1441,7 +1429,6 @@
GncPluginPageRegisterPrivate *priv;
GNCLedgerDisplayType ledger_type;
GNCLedgerDisplay *ld;
- SplitRegister *reg;
Account *leader;
const char* color;
@@ -1449,7 +1436,6 @@
priv = GNC_PLUGIN_PAGE_REGISTER_GET_PRIVATE(plugin_page);
ld = priv->ledger;
- reg = gnc_ledger_display_get_split_register (ld);
ledger_type = gnc_ledger_display_type (ld);
leader = gnc_ledger_display_leader (ld);
color = NULL;
@@ -1466,7 +1452,6 @@
GncPluginPageRegisterPrivate *priv;
GNCLedgerDisplayType ledger_type;
GNCLedgerDisplay *ld;
- SplitRegister *reg;
Account *leader;
const char* filter;
@@ -1474,7 +1459,6 @@
priv = GNC_PLUGIN_PAGE_REGISTER_GET_PRIVATE(plugin_page);
ld = priv->ledger;
- reg = gnc_ledger_display_get_split_register (ld);
ledger_type = gnc_ledger_display_type (ld);
leader = gnc_ledger_display_leader (ld);
filter = NULL;
@@ -1489,16 +1473,12 @@
gnc_plugin_page_register_set_filter (GncPluginPage *plugin_page, const gchar *filter )
{
GncPluginPageRegisterPrivate *priv;
- GNCLedgerDisplayType ledger_type;
GNCLedgerDisplay *ld;
- SplitRegister *reg;
Account *leader;
gchar *default_filter;
priv = GNC_PLUGIN_PAGE_REGISTER_GET_PRIVATE(plugin_page);
ld = priv->ledger;
- reg = gnc_ledger_display_get_split_register (ld);
- ledger_type = gnc_ledger_display_type (ld);
leader = gnc_ledger_display_leader (ld);
if (leader != NULL)
@@ -1522,7 +1502,6 @@
GncPluginPageRegisterPrivate *priv;
GNCLedgerDisplayType ledger_type;
GNCLedgerDisplay *ld;
- SplitRegister *reg;
Account *leader;
const char* sort_order;
@@ -1530,7 +1509,6 @@
priv = GNC_PLUGIN_PAGE_REGISTER_GET_PRIVATE(plugin_page);
ld = priv->ledger;
- reg = gnc_ledger_display_get_split_register (ld);
ledger_type = gnc_ledger_display_type (ld);
leader = gnc_ledger_display_leader (ld);
sort_order = NULL;
@@ -1545,15 +1523,11 @@
gnc_plugin_page_register_set_sort_order (GncPluginPage *plugin_page, const gchar *sort_order )
{
GncPluginPageRegisterPrivate *priv;
- GNCLedgerDisplayType ledger_type;
GNCLedgerDisplay *ld;
- SplitRegister *reg;
Account *leader;
priv = GNC_PLUGIN_PAGE_REGISTER_GET_PRIVATE(plugin_page);
ld = priv->ledger;
- reg = gnc_ledger_display_get_split_register (ld);
- ledger_type = gnc_ledger_display_type (ld);
leader = gnc_ledger_display_leader (ld);
if (leader != NULL)
@@ -1573,14 +1547,12 @@
GncPluginPageRegisterPrivate *priv;
GNCLedgerDisplayType ledger_type;
GNCLedgerDisplay *ld;
- SplitRegister *reg;
Account *leader;
g_return_val_if_fail (GNC_IS_PLUGIN_PAGE_REGISTER (plugin_page), _("unknown"));
priv = GNC_PLUGIN_PAGE_REGISTER_GET_PRIVATE(plugin_page);
ld = priv->ledger;
- reg = gnc_ledger_display_get_split_register (ld);
ledger_type = gnc_ledger_display_type (ld);
leader = gnc_ledger_display_leader (ld);
@@ -1858,10 +1830,9 @@
{
struct tm * timeinfo;
gchar date_string[11];
- gint i;
timeinfo = localtime ( &raw_time );
- i = strftime(date_string, 11, "%d-%m-%Y", timeinfo );
+ strftime(date_string, 11, "%d-%m-%Y", timeinfo );
PINFO("Date string is %s", date_string);
return g_strdup(date_string);
@@ -1992,7 +1963,6 @@
get_filter_times(GncPluginPageRegister *page)
{
GncPluginPageRegisterPrivate *priv;
- GtkWidget *button, *today, *gde;
time_t time_val;
priv = GNC_PLUGIN_PAGE_REGISTER_GET_PRIVATE(page);
@@ -2482,7 +2452,7 @@
}
else if (ledger_type == LD_GL && reg->type == SEARCH_LEDGER)
{
- Account *common_acct = NULL, *account;
+ Account *common_acct = NULL;
splits = qof_query_run(gnc_ledger_display_get_query(priv->ledger));
/* Make sure each split is from the same account */
for (item = splits; item; item = g_list_next(item))
@@ -2785,8 +2755,7 @@
{
GncPluginPageRegisterPrivate *priv;
SplitRegister *reg;
- GNCSplitReg *gsr;
- Transaction *trans, *new_trans;
+ Transaction *trans;
Timespec entered;
ENTER("(action %p, page %p)", action, page);
@@ -2871,7 +2840,7 @@
GncPluginPageRegister *page)
{
GncPluginPageRegisterPrivate *priv;
- GtkWidget *dialog, *toggle, *button, *start_date, *end_date, *table, *hbox;
+ GtkWidget *dialog, *toggle, *button, *table, *hbox;
time_t start_time, end_time, time_val;
GtkBuilder *builder;
gboolean sensitive, value;
@@ -3297,7 +3266,6 @@
{
GncPluginPageRegisterPrivate *priv;
GncPluginPage *new_page;
- GncPluginPageRegister *new_reg_page;
GtkWidget *window;
GNCSplitReg *gsr;
SplitRegister *reg;
@@ -3362,7 +3330,6 @@
LEAVE("couldn't create new page");
return;
}
- new_reg_page = GNC_PLUGIN_PAGE_REGISTER(new_page);
gnc_main_window_open_page (GNC_MAIN_WINDOW(window), new_page);
gsr = gnc_plugin_page_register_get_gsr (new_page);
Modified: gnucash/trunk/src/gnome/gnc-plugin-page-sx-list.c
===================================================================
--- gnucash/trunk/src/gnome/gnc-plugin-page-sx-list.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/gnome/gnc-plugin-page-sx-list.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -71,7 +71,7 @@
#undef G_LOG_DOMAIN
#define G_LOG_DOMAIN "gnc.gui.plugin-page.sx-list"
-static QofLogModule log_module = GNC_MOD_GUI_SX;
+G_GNUC_UNUSED static QofLogModule log_module = GNC_MOD_GUI_SX;
#define PLUGIN_PAGE_SX_LIST_CM_CLASS "plugin-page-sx-list"
#define GCONF_SECTION "window/pages/sx_list"
@@ -201,11 +201,8 @@
gnc_plugin_page_sx_list_init (GncPluginPageSxList *plugin_page)
{
GtkActionGroup *action_group;
- GncPluginPageSxListPrivate *priv;
GncPluginPage *parent;
- priv = GNC_PLUGIN_PAGE_SX_LIST_GET_PRIVATE(plugin_page);
-
/* Init parent declared variables */
parent = GNC_PLUGIN_PAGE(plugin_page);
g_object_set(G_OBJECT(plugin_page),
@@ -287,11 +284,7 @@
static void
gnc_plugin_page_sx_list_close_cb (gpointer user_data)
{
- GncPluginPage *plugin_page;
- GncPluginPageSxList *page;
-
- plugin_page = GNC_PLUGIN_PAGE(user_data);
- page = GNC_PLUGIN_PAGE_SX_LIST (plugin_page);
+ GncPluginPage *plugin_page = GNC_PLUGIN_PAGE(user_data);
gnc_main_window_close_page(plugin_page);
}
Modified: gnucash/trunk/src/gnome/gnc-plugin-register.c
===================================================================
--- gnucash/trunk/src/gnome/gnc-plugin-register.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/gnome/gnc-plugin-register.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -174,14 +174,8 @@
static void
gnc_plugin_register_finalize (GObject *object)
{
- GncPluginRegister *plugin;
- GncPluginRegisterPrivate *priv;
-
g_return_if_fail (GNC_IS_PLUGIN_REGISTER (object));
- plugin = GNC_PLUGIN_REGISTER (object);
- priv = GNC_PLUGIN_REGISTER_GET_PRIVATE(plugin);
-
G_OBJECT_CLASS (parent_class)->finalize (object);
}
Modified: gnucash/trunk/src/gnome/gnc-split-reg.c
===================================================================
--- gnucash/trunk/src/gnome/gnc-split-reg.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/gnome/gnc-split-reg.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -1011,7 +1011,6 @@
void
gsr_default_delete_handler( GNCSplitReg *gsr, gpointer data )
{
- SplitRegisterStyle style;
CursorClass cursor_class;
SplitRegister *reg;
Transaction *trans;
@@ -1031,7 +1030,6 @@
}
trans = xaccSplitGetParent(split);
- style = reg->style;
cursor_class = gnc_split_register_get_current_cursor_class (reg);
/* Deleting the blank split just cancels */
Modified: gnucash/trunk/src/gnome/reconcile-list.c
===================================================================
--- gnucash/trunk/src/gnome/reconcile-list.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/gnome/reconcile-list.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -237,10 +237,8 @@
gnc_reconcile_list_class_init (GNCReconcileListClass *klass)
{
GObjectClass *object_class;
- GtkCListClass *clist_class;
object_class = G_OBJECT_CLASS (klass);
- clist_class = GTK_CLIST_CLASS (klass);
parent_class = g_type_class_peek_parent (klass);
Modified: gnucash/trunk/src/gnome/top-level.c
===================================================================
--- gnucash/trunk/src/gnome/top-level.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/gnome/top-level.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -112,7 +112,6 @@
Account * account = NULL;
Transaction * trans;
GList * node;
- QofBook * book = gnc_get_current_book();
GncGUID guid;
QofInstance * entity = NULL;
@@ -191,7 +190,6 @@
gnc_html_price_url_cb (const char *location, const char *label,
gboolean new_window, GNCURLResult *result)
{
- QofBook * book = gnc_get_current_book();
GncGUID guid;
QofInstance * entity = NULL;
Modified: gnucash/trunk/src/gnome/window-reconcile.c
===================================================================
--- gnucash/trunk/src/gnome/window-reconcile.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/gnome/window-reconcile.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -158,7 +158,7 @@
/** GLOBALS ************************************************************/
/* This static indicates the debugging module that this .o belongs to. */
-static QofLogModule log_module = GNC_MOD_GUI;
+G_GNUC_UNUSED static QofLogModule log_module = GNC_MOD_GUI;
static time_t gnc_reconcile_last_statement_date = 0;
Modified: gnucash/trunk/src/gnome-search/dialog-search.c
===================================================================
--- gnucash/trunk/src/gnome-search/dialog-search.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/gnome-search/dialog-search.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -1277,7 +1277,6 @@
void
gnc_search_dialog_test (void)
{
- GNCSearchWindow *sw;
static GList *params = NULL;
static GList *display = NULL;
static GNCSearchCallbackButton buttons[] =
@@ -1297,9 +1296,10 @@
if (display == NULL)
display = get_display_list (GNC_ID_SPLIT);
- sw = gnc_search_dialog_create (GNC_ID_SPLIT, _("Find Transaction"),
- params, display,
- NULL, NULL, buttons, NULL, NULL, NULL, NULL,
- NULL, NULL);
+/* FIXME: All this does is leak. */
+ gnc_search_dialog_create (GNC_ID_SPLIT, _("Find Transaction"),
+ params, display,
+ NULL, NULL, buttons, NULL, NULL, NULL, NULL,
+ NULL, NULL);
}
Modified: gnucash/trunk/src/gnome-utils/assistant-gconf-setup.c
===================================================================
--- gnucash/trunk/src/gnome-utils/assistant-gconf-setup.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/gnome-utils/assistant-gconf-setup.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -231,7 +231,6 @@
gchar *gconfdir = gnc_path_get_gconfdir (TRUE);
gint num = gtk_assistant_get_current_page (assistant);
- GtkWidget *page = gtk_assistant_get_nth_page (assistant, num);
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(data->update_path)))
{
@@ -305,9 +304,7 @@
void
assistant_gconf_step_prep (GtkAssistant *assistant, gpointer user_data)
{
- gconf_data *data = user_data;
gint num = gtk_assistant_get_current_page (assistant);
- GtkWidget *page = gtk_assistant_get_nth_page (assistant, num);
gtk_assistant_set_current_page (assistant, num + 2);
}
@@ -417,7 +414,6 @@
assistant_gconf_finish (GtkAssistant *assistant, gpointer user_data)
{
gconf_data *data = user_data;
- GtkWidget *window;
gint value, value2;
GError *error = NULL;
gboolean keep_going = TRUE;
@@ -478,8 +474,6 @@
assistant_gconf_prepare (GtkAssistant *assistant, GtkWidget *page,
gconf_data *data)
{
- gint currentpage = gtk_assistant_get_current_page(assistant);
-
switch (gtk_assistant_get_current_page(assistant))
{
case 2:
Modified: gnucash/trunk/src/gnome-utils/assistant-xml-encoding.c
===================================================================
--- gnucash/trunk/src/gnome-utils/assistant-xml-encoding.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/gnome-utils/assistant-xml-encoding.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -231,8 +231,6 @@
void gxi_prepare_cb (GtkAssistant *assistant, GtkWidget *page,
GncXmlImportData *data)
{
- gint currentpage = gtk_assistant_get_current_page(assistant);
-
switch (gtk_assistant_get_current_page(assistant))
{
case 1:
@@ -281,7 +279,6 @@
{
GncXmlImportData *data;
GtkWidget *widget;
- GtkVBox *vb;
GtkBuilder *builder;
gboolean success;
@@ -1050,7 +1047,7 @@
QofBook *book;
FileBackend *backend;
QofBackendError io_err = ERR_BACKEND_NO_ERR;
- gchar *logpath, *message = NULL;
+ gchar *message = NULL;
gboolean success = FALSE;
if (data->n_unassigned || data->n_impossible)
@@ -1165,7 +1162,6 @@
GtkTreeIter iter, parent, *parent_ptr;
GList *encodings_bak, *enc_iter;
const gchar *encoding;
- gchar *string;
system_encoding_type *system_enc;
gpointer enc_ptr;
gint i, j;
@@ -1232,7 +1228,7 @@
enc_ptr = GUINT_TO_POINTER (g_quark_from_string (system_enc->encoding));
else
enc_ptr = NULL;
- string = gettext (system_enc->text);
+
gtk_tree_store_append (tree_store, &iter, parent_ptr);
gtk_tree_store_set (tree_store, &iter, ENC_COL_STRING,
gettext (system_enc->text), ENC_COL_QUARK, enc_ptr, -1);
Modified: gnucash/trunk/src/gnome-utils/dialog-book-close.c
===================================================================
--- gnucash/trunk/src/gnome-utils/dialog-book-close.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/gnome-utils/dialog-book-close.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -96,7 +96,6 @@
txn = g_hash_table_lookup(cacb->txns, cmdty);
if (!txn)
{
- kvp_frame* frame;
txn = g_new0(struct CACBTransactionList, 1);
txn->cmdty = cmdty;
txn->total = gnc_numeric_zero();
Modified: gnucash/trunk/src/gnome-utils/dialog-dup-trans.c
===================================================================
--- gnucash/trunk/src/gnome-utils/dialog-dup-trans.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/gnome-utils/dialog-dup-trans.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -34,7 +34,7 @@
#include "qof.h"
/* This static indicates the debugging module that this .o belongs to. */
-static QofLogModule log_module = G_LOG_DOMAIN;
+G_GNUC_UNUSED static QofLogModule log_module = G_LOG_DOMAIN;
typedef struct
{
Modified: gnucash/trunk/src/gnome-utils/dialog-file-access.c
===================================================================
--- gnucash/trunk/src/gnome-utils/dialog-file-access.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/gnome-utils/dialog-file-access.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -244,8 +244,6 @@
{
FileAccessWindow *faw;
GtkBuilder* builder;
- GtkWidget* box;
- GList* ds_node;
GtkButton* op;
GtkWidget* file_chooser;
GtkFileChooserWidget* fileChooser;
Modified: gnucash/trunk/src/gnome-utils/dialog-object-references.c
===================================================================
--- gnucash/trunk/src/gnome-utils/dialog-object-references.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/gnome-utils/dialog-object-references.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -40,15 +40,12 @@
GtkWidget* dialog;
GtkBuilder* builder;
GtkWidget* box;
- GList* ds_node;
- GtkButton* op;
GList* node;
GtkLabel* explanation;
GtkListStore* store;
GtkWidget* listview;
GtkTreeViewColumn* column;
GtkCellRenderer* renderer;
- gint response;
ENTER("");
@@ -85,7 +82,7 @@
/* Run the dialog */
gtk_widget_show_all( dialog );
- response = gtk_dialog_run( GTK_DIALOG(dialog) );
+ gtk_dialog_run( GTK_DIALOG(dialog) );
g_object_unref(G_OBJECT(builder));
gtk_widget_destroy( dialog );
Modified: gnucash/trunk/src/gnome-utils/dialog-options.c
===================================================================
--- gnucash/trunk/src/gnome-utils/dialog-options.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/gnome-utils/dialog-options.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -2918,10 +2918,9 @@
GtkComboBox *cb;
GtkTreeModel *tm;
GtkTreeIter iter;
- gboolean success;
cb = GTK_COMBO_BOX(widget);
- success = gtk_combo_box_get_active_iter(cb, &iter);
+ gtk_combo_box_get_active_iter(cb, &iter);
tm = gtk_combo_box_get_model(cb);
bgt = gnc_tree_model_budget_get_budget(tm, &iter);
Modified: gnucash/trunk/src/gnome-utils/dialog-transfer.c
===================================================================
--- gnucash/trunk/src/gnome-utils/dialog-transfer.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/gnome-utils/dialog-transfer.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -1693,7 +1693,6 @@
static void
gnc_xfer_dialog_create(GtkWidget *parent, XferDialog *xferData)
{
- GtkWidget *dialog;
GtkBuilder *builder;
gboolean use_accounting_labels;
Modified: gnucash/trunk/src/gnome-utils/gnc-account-sel.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-account-sel.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/gnome-utils/gnc-account-sel.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -361,9 +361,6 @@
void
gnc_account_sel_set_acct_filters( GNCAccountSel *gas, GList *typeFilters, GList *commodityFilters )
{
- GList *src = NULL;
- GList *dest = NULL;
- gnc_commodity* commClone = NULL;
if ( gas->acctTypeFilters != NULL )
{
Modified: gnucash/trunk/src/gnome-utils/gnc-autosave.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-autosave.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/gnome-utils/gnc-autosave.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -77,11 +77,10 @@
static gboolean autosave_confirm(GtkWidget *toplevel)
{
- GtkWidget *dialog, *label;
+ GtkWidget *dialog;
guint interval_mins =
gnc_gconf_get_float(GCONF_GENERAL, KEY_AUTOSAVE_INTERVAL, NULL);
gboolean switch_off_autosave, show_expl_again, save_now;
- gchar *message;
gint response;
#define YES_THIS_TIME 1
Modified: gnucash/trunk/src/gnome-utils/gnc-date-edit.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-date-edit.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/gnome-utils/gnc-date-edit.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -575,14 +575,10 @@
static void
gnc_date_edit_finalize (GObject *object)
{
- GNCDateEdit *gde;
g_return_if_fail (object != NULL);
g_return_if_fail (GNC_IS_DATE_EDIT (object));
- gde = GNC_DATE_EDIT (object);
-
-
if (G_OBJECT_CLASS (parent_class)->finalize)
(* G_OBJECT_CLASS (parent_class)->finalize) (object);
}
Modified: gnucash/trunk/src/gnome-utils/gnc-date-format.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-date-format.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/gnome-utils/gnc-date-format.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -49,7 +49,7 @@
#define MAX_DATE_LEN 80
/* This static indicates the debugging module that this .o belongs to. */
-static QofLogModule log_module = GNC_MOD_GUI;
+G_GNUC_UNUSED static QofLogModule log_module = GNC_MOD_GUI;
enum
{
@@ -209,15 +209,9 @@
static void
gnc_date_format_finalize (GObject *object)
{
- GNCDateFormat *gdf;
- GNCDateFormatPriv *priv;
-
g_return_if_fail(object != NULL);
g_return_if_fail(GNC_IS_DATE_FORMAT(object));
- gdf = GNC_DATE_FORMAT(object);
- priv = GNC_DATE_FORMAT_GET_PRIVATE(gdf);
-
if (G_OBJECT_CLASS(parent_class)->finalize)
(* G_OBJECT_CLASS(parent_class)->finalize) (object);
}
Modified: gnucash/trunk/src/gnome-utils/gnc-dense-cal.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-dense-cal.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/gnome-utils/gnc-dense-cal.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -671,12 +671,9 @@
static void
gnc_dense_cal_finalize (GObject *object)
{
- GncDenseCal *dcal;
g_return_if_fail (object != NULL);
g_return_if_fail (GNC_IS_DENSE_CAL (object));
- dcal = GNC_DENSE_CAL(object);
-
if (G_OBJECT_CLASS (parent_class)->finalize)
G_OBJECT_CLASS(parent_class)->finalize(object);
}
@@ -747,12 +744,9 @@
static void
recompute_x_y_scales(GncDenseCal *dcal)
{
- GtkWidget *widget;
int denom;
int width, height;
- widget = GTK_WIDGET(dcal);
-
width = DENSE_CAL_DEFAULT_WIDTH;
height = DENSE_CAL_DEFAULT_HEIGHT;
if (dcal->initialized)
Modified: gnucash/trunk/src/gnome-utils/gnc-embedded-window.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-embedded-window.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/gnome-utils/gnc-embedded-window.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -250,16 +250,10 @@
static void
gnc_embedded_window_finalize (GObject *object)
{
- GncEmbeddedWindow *window;
- GncEmbeddedWindowPrivate *priv;
-
g_return_if_fail (object != NULL);
g_return_if_fail (GNC_IS_EMBEDDED_WINDOW (object));
ENTER("object %p", object);
- window = GNC_EMBEDDED_WINDOW (object);
- priv = GNC_EMBEDDED_WINDOW_GET_PRIVATE(window);
-
gnc_gobject_tracking_forget(object);
G_OBJECT_CLASS (parent_class)->finalize (object);
LEAVE(" ");
Modified: gnucash/trunk/src/gnome-utils/gnc-file.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-file.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/gnome-utils/gnc-file.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -1055,14 +1055,9 @@
void
gnc_file_export (void)
{
- QofSession *new_session;
- QofSession *session;
const char *filename;
char *default_dir = NULL; /* Default to last open */
char *last;
- char *newfile;
- const char *oldfile;
- QofBackendError io_err = ERR_BACKEND_NO_ERR;
ENTER(" ");
Modified: gnucash/trunk/src/gnome-utils/gnc-general-select.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-general-select.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/gnome-utils/gnc-general-select.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -149,14 +149,9 @@
static void
gnc_general_select_finalize (GObject *object)
{
- GNCGeneralSelect *gsl;
-
g_return_if_fail (object != NULL);
g_return_if_fail (GNC_IS_GENERAL_SELECT (object));
- gsl = GNC_GENERAL_SELECT (object);
-
-
if (G_OBJECT_CLASS (parent_class)->finalize)
G_OBJECT_CLASS (parent_class)->finalize (object);
}
Modified: gnucash/trunk/src/gnome-utils/gnc-gnome-utils.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-gnome-utils.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/gnome-utils/gnc-gnome-utils.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -242,7 +242,6 @@
void
gnc_gnome_init (int argc, char **argv, const char * version)
{
- GError *error = NULL;
gchar *prefix = gnc_path_get_prefix ();
gchar *pkgsysconfdir = gnc_path_get_pkgsysconfdir ();
gchar *pkgdatadir = gnc_path_get_pkgdatadir ();
@@ -316,7 +315,7 @@
NULL
};
GList *icons = NULL;
- char *fullname, *name_iter;
+ char *fullname;
for (idx = 0; icon_filenames[idx] != NULL; idx++)
{
@@ -704,7 +703,9 @@
{
static GncMainWindow *main_window;
gchar *map;
+#ifdef MAC_INTEGRATION
gchar *data_dir;
+#endif
ENTER ("");
Modified: gnucash/trunk/src/gnome-utils/gnc-keyring.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-keyring.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/gnome-utils/gnc-keyring.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -36,7 +36,7 @@
#endif
/* This static indicates the debugging module that this .o belongs to. */
-static QofLogModule log_module = GNC_MOD_GUI;
+G_GNUC_UNUSED static QofLogModule log_module = GNC_MOD_GUI;
void gnc_keyring_set_password (const gchar *access_method,
const gchar *server,
Modified: gnucash/trunk/src/gnome-utils/gnc-main-window.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-main-window.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/gnome-utils/gnc-main-window.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -115,7 +115,9 @@
static void gnc_main_window_setup_window (GncMainWindow *window);
static void gnc_window_main_window_init (GncWindowIface *iface);
+#ifndef MAC_INTEGRATION
static void gnc_main_window_update_all_menu_items (void);
+#endif
/* Callbacks */
static void gnc_main_window_add_widget (GtkUIManager *merge, GtkWidget *widget, GncMainWindow *window);
@@ -142,7 +144,9 @@
static void gnc_main_window_cmd_actions_rename_page (GtkAction *action, GncMainWindow *window);
static void gnc_main_window_cmd_window_new (GtkAction *action, GncMainWindow *window);
static void gnc_main_window_cmd_window_move_page (GtkAction *action, GncMainWindow *window);
+#ifndef MAC_INTEGRATION
static void gnc_main_window_cmd_window_raise (GtkAction *action, GtkRadioAction *current, GncMainWindow *window);
+#endif
static void gnc_main_window_cmd_help_tutorial (GtkAction *action, GncMainWindow *window);
static void gnc_main_window_cmd_help_contents (GtkAction *action, GncMainWindow *window);
static void gnc_main_window_cmd_help_about (GtkAction *action, GncMainWindow *window);
@@ -381,6 +385,7 @@
/** The number of toggle actions provided by the main window. */
static guint n_toggle_actions = G_N_ELEMENTS (toggle_actions);
+#ifndef MAC_INTEGRATION
/** An array of all of the radio action provided by the main window
* code. */
static GtkRadioActionEntry radio_entries [] =
@@ -396,10 +401,11 @@
{ "Window8Action", NULL, N_("Window _9"), NULL, NULL, 8 },
{ "Window9Action", NULL, N_("Window _0"), NULL, NULL, 9 },
};
+
/** The number of radio actions provided by the main window. */
static guint n_radio_entries = G_N_ELEMENTS (radio_entries);
+#endif
-
/** These are the "important" actions provided by the main window.
* Their labels will appear when the toolbar is set to "Icons and
* important text" (e.g. GTK_TOOLBAR_BOTH_HORIZ) mode. */
@@ -1497,7 +1503,7 @@
gboolean visible;
};
-
+#ifndef MAC_INTEGRATION
/** Update the label on the specified GtkRadioAction in the specified
* window. This action is displayed as a menu item in the "Windows"
* menu. This function will end up being called whenever the front
@@ -1527,17 +1533,9 @@
"label", data->label,
"visible", data->visible,
(char *)NULL);
-#ifdef MAC_INTEGRATION
- {
- GtkOSXApplication *theApp =
- g_object_new(GTK_TYPE_OSX_APPLICATION, NULL);
- gtk_osxapplication_sync_menubar(theApp);
- }
-#endif
LEAVE(" ");
}
-
/** Update the window selection GtkRadioAction for a specific window.
* This is fairly simple since the windows are listed in the same
* order that they appear in the active_windows list, so the index
@@ -1593,7 +1591,6 @@
LEAVE(" ");
}
-
/** In every window that the user has open, update the "Window" menu
* item that points to the specified window. This keeps the "Window"
* menu items consistent across all open windows. (These items
@@ -1648,6 +1645,7 @@
LEAVE(" ");
}
+#endif /* !MAC_INTEGRATION */
/** Update all menu entries for all window menu items in all windows.
* This function is called whenever a window is added or deleted.
@@ -1656,6 +1654,8 @@
*
* @internal
*/
+
+#ifndef MAC_INTEGRATION
static void
gnc_main_window_update_all_menu_items (void)
{
@@ -1664,7 +1664,6 @@
gint i;
ENTER("");
-#ifndef MAC_INTEGRATION
/* First update the entries for all existing windows */
g_list_foreach(active_windows,
(GFunc)gnc_main_window_update_menu_item,
@@ -1688,11 +1687,10 @@
g_free(data.action_name);
g_free(label);
}
-#endif
LEAVE(" ");
}
+#endif /* !MAC_INTEGRATION */
-
/** Show/hide the close box on the tab of a notebook page. This
* function first checks to see if the specified page has a close
* box, and if so, sets its visibility to the requested state.
@@ -1985,7 +1983,6 @@
const gchar *color_in)
{
GncMainWindow *window;
- GncMainWindowPrivate *priv;
GtkWidget *event_box;
GdkColor tab_color;
gchar *color_string;
@@ -2010,7 +2007,6 @@
/* Update the plugin */
window = GNC_MAIN_WINDOW(page->window);
- priv = GNC_MAIN_WINDOW_GET_PRIVATE(window);
gnc_plugin_page_set_page_color(page, color_string);
/* Update the notebook tab */
@@ -2269,15 +2265,9 @@
static void
gnc_main_window_finalize (GObject *object)
{
- GncMainWindow *window;
- GncMainWindowPrivate *priv;
-
g_return_if_fail (object != NULL);
g_return_if_fail (GNC_IS_MAIN_WINDOW (object));
- window = GNC_MAIN_WINDOW (object);
- priv = GNC_MAIN_WINDOW_GET_PRIVATE (window);
-
if (active_windows == NULL)
{
/* Oops. User killed last window and we didn't catch it. */
@@ -3235,12 +3225,12 @@
static void
gnc_main_window_window_menu (GncMainWindow *window)
{
- GncMainWindowPrivate *priv;
guint merge_id;
#ifdef MAC_INTEGRATION
gchar *filename = gnc_gnome_locate_ui_file("gnc-windows-menu-ui-quartz.xml");
#else
gchar *filename = gnc_gnome_locate_ui_file("gnc-windows-menu-ui.xml");
+ GncMainWindowPrivate *priv;
#endif
GError *error = NULL;
g_assert(filename);
@@ -3446,7 +3436,6 @@
static void
gnc_quartz_set_menu(GncMainWindow* window)
{
- GtkOSXApplicationMenuGroup *group;
GtkOSXApplication *theApp = g_object_new(GTK_TYPE_OSX_APPLICATION, NULL);
GtkWidget *menu;
GtkWidget *item;
@@ -3768,7 +3757,6 @@
GtkWidget *widget = gtk_window_get_focus (GTK_WINDOW (window));
GtkTextBuffer *text_buffer;
GtkClipboard *clipboard;
- gboolean editable;
if (GTK_IS_EDITABLE (widget))
{
@@ -3779,7 +3767,6 @@
text_buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW(widget));
clipboard = gtk_widget_get_clipboard (GTK_WIDGET(text_buffer),
GDK_SELECTION_CLIPBOARD);
- editable = gtk_text_view_get_editable (GTK_TEXT_VIEW (widget));
gtk_text_buffer_paste_clipboard (text_buffer, clipboard, NULL, FALSE);
}
}
@@ -3893,7 +3880,7 @@
static void
gnc_main_window_cmd_window_move_page (GtkAction *action, GncMainWindow *window)
{
- GncMainWindowPrivate *priv, *new_priv;
+ GncMainWindowPrivate *priv;
GncMainWindow *new_window;
GncPluginPage *page;
GtkNotebook *notebook;
@@ -3940,7 +3927,6 @@
g_object_unref(page);
/* just a little debugging. :-) */
- new_priv = GNC_MAIN_WINDOW_GET_PRIVATE(new_window);
DEBUG("Moved page %p from window %p to new window %p",
page, window, new_window);
DEBUG("Old window current is %p, new window current is %p",
@@ -3949,6 +3935,7 @@
LEAVE("page moved");
}
+#ifndef MAC_INTEGRATION
static void
gnc_main_window_cmd_window_raise (GtkAction *action,
GtkRadioAction *current,
@@ -3965,13 +3952,12 @@
value = gtk_radio_action_get_current_value(current);
new_window = g_list_nth_data(active_windows, value);
gtk_window_present(GTK_WINDOW(new_window));
-#ifndef MAC_INTEGRATION
/* revert the change in the radio group
* impossible while handling "changed" (G_SIGNAL_NO_RECURSE) */
g_idle_add((GSourceFunc)gnc_main_window_update_radio_button, old_window);
-#endif
LEAVE(" ");
}
+#endif /* !MAC_INTEGRATION */
static void
gnc_main_window_cmd_help_tutorial (GtkAction *action, GncMainWindow *window)
Modified: gnucash/trunk/src/gnome-utils/gnc-plugin-file-history.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-plugin-file-history.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/gnome-utils/gnc-plugin-file-history.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -617,15 +617,9 @@
static void
gnc_plugin_file_history_finalize (GObject *object)
{
- GncPluginFileHistory *plugin;
- GncPluginFileHistoryPrivate *priv;
-
g_return_if_fail (GNC_IS_PLUGIN_FILE_HISTORY (object));
ENTER("plugin %p", object);
- plugin = GNC_PLUGIN_FILE_HISTORY (object);
- priv = GNC_PLUGIN_FILE_HISTORY_GET_PRIVATE (plugin);
-
G_OBJECT_CLASS (parent_class)->finalize (object);
LEAVE("");
}
Modified: gnucash/trunk/src/gnome-utils/gnc-plugin-manager.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-plugin-manager.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/gnome-utils/gnc-plugin-manager.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -246,14 +246,8 @@
static void
gnc_plugin_manager_finalize (GObject *object)
{
- GncPluginManager *manager;
- GncPluginManagerPrivate *priv;
-
g_return_if_fail (GNC_IS_PLUGIN_MANAGER (object));
- manager = GNC_PLUGIN_MANAGER (object);
- priv = GNC_PLUGIN_MANAGER_GET_PRIVATE (manager);
-
G_OBJECT_CLASS (parent_class)->finalize (object);
}
Modified: gnucash/trunk/src/gnome-utils/gnc-plugin-menu-additions.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-plugin-menu-additions.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/gnome-utils/gnc-plugin-menu-additions.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -149,15 +149,9 @@
static void
gnc_plugin_menu_additions_finalize (GObject *object)
{
- GncPluginMenuAdditions *plugin;
- GncPluginMenuAdditionsPrivate *priv;
-
g_return_if_fail (GNC_IS_PLUGIN_MENU_ADDITIONS (object));
ENTER("plugin %p", object);
- plugin = GNC_PLUGIN_MENU_ADDITIONS (object);
- priv = GNC_PLUGIN_MENU_ADDITIONS_GET_PRIVATE (plugin);
-
G_OBJECT_CLASS (parent_class)->finalize (object);
LEAVE("");
}
Modified: gnucash/trunk/src/gnome-utils/gnc-plugin.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-plugin.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/gnome-utils/gnc-plugin.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -141,14 +141,8 @@
static void
gnc_plugin_finalize (GObject *object)
{
- GncPlugin *plugin;
- GncPluginPrivate *priv;
-
g_return_if_fail (GNC_IS_PLUGIN (object));
- plugin = GNC_PLUGIN (object);
- priv = GNC_PLUGIN_GET_PRIVATE (plugin);
-
gnc_gobject_tracking_forget(object);
G_OBJECT_CLASS (parent_class)->finalize (object);
}
Modified: gnucash/trunk/src/gnome-utils/gnc-query-list.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-query-list.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/gnome-utils/gnc-query-list.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -272,7 +272,6 @@
gnc_query_list_init_clist (GNCQueryList *list)
{
GtkCList *clist = GTK_CLIST (list);
- GtkStyle *style;
GList *node;
gchar **titles;
gint i;
@@ -317,13 +316,14 @@
G_CALLBACK(gnc_query_list_size_allocate_cb),
NULL);
- style = gtk_widget_get_style (GTK_WIDGET(list));
#if 0
{
+ GtkStyle *style;
GdkFont *font = NULL;
gint width;
+ style = gtk_widget_get_style (GTK_WIDGET(list));
font = style->font;
if (font != NULL)
{
@@ -346,13 +346,9 @@
gnc_query_list_class_init (GNCQueryListClass *klass)
{
GtkObjectClass *object_class;
- GtkWidgetClass *widget_class;
- GtkContainerClass *container_class;
GtkCListClass *clist_class;
object_class = (GtkObjectClass*) klass;
- widget_class = (GtkWidgetClass*) klass;
- container_class = (GtkContainerClass*) klass;
clist_class = (GtkCListClass*) klass;
parent_class = gtk_type_class(GTK_TYPE_CLIST);
Modified: gnucash/trunk/src/gnome-utils/gnc-recurrence.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-recurrence.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/gnome-utils/gnc-recurrence.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -348,19 +348,17 @@
gnc_recurrence_class_init( GncRecurrenceClass *klass )
{
GObjectClass *object_class;
- static gint signals[LAST_SIGNAL] = { 0 };
object_class = G_OBJECT_CLASS (klass);
- signals[GNCRECURRENCE_CHANGED] =
- g_signal_new ("changed",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_FIRST,
- G_STRUCT_OFFSET (GncRecurrenceClass, changed),
- NULL,
- NULL,
- g_cclosure_marshal_VOID__VOID,
- G_TYPE_NONE,
- 0);
+ g_signal_new ("changed",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_FIRST,
+ G_STRUCT_OFFSET (GncRecurrenceClass, changed),
+ NULL,
+ NULL,
+ g_cclosure_marshal_VOID__VOID,
+ G_TYPE_NONE,
+ 0);
parent_class = g_type_class_peek_parent (klass);
object_class->finalize = gnc_recurrence_finalize;
@@ -577,19 +575,17 @@
gnc_recurrence_comp_class_init( GncRecurrenceCompClass *klass )
{
GObjectClass *object_class;
- static gint signals[GNCRC_LAST_SIGNAL] = { 0 };
object_class = G_OBJECT_CLASS (klass);
- signals[GNCRECURRENCECOMP_CHANGED] =
- g_signal_new ("changed",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_FIRST,
- G_STRUCT_OFFSET (GncRecurrenceCompClass, changed),
- NULL,
- NULL,
- g_cclosure_marshal_VOID__VOID,
- G_TYPE_NONE,
- 0);
+ g_signal_new ("changed",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_FIRST,
+ G_STRUCT_OFFSET (GncRecurrenceCompClass, changed),
+ NULL,
+ NULL,
+ g_cclosure_marshal_VOID__VOID,
+ G_TYPE_NONE,
+ 0);
//parent_class = g_type_class_peek_parent (klass);
//object_class->finalize = gnc_recurrence_finalize;
Modified: gnucash/trunk/src/gnome-utils/gnc-tree-model-account-types.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-tree-model-account-types.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/gnome-utils/gnc-tree-model-account-types.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -124,15 +124,9 @@
static void
gnc_tree_model_account_types_finalize (GObject * object)
{
- GncTreeModelAccountTypes *model;
- GncTreeModelAccountTypesPrivate *priv;
-
g_return_if_fail (object != NULL);
g_return_if_fail (GNC_IS_TREE_MODEL_ACCOUNT_TYPES (object));
- model = GNC_TREE_MODEL_ACCOUNT_TYPES (object);
- priv = GNC_TREE_MODEL_ACCOUNT_TYPES_GET_PRIVATE (model);
-
G_OBJECT_CLASS (parent_class)->finalize (object);
}
Modified: gnucash/trunk/src/gnome-utils/gnc-tree-model-account.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-tree-model-account.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/gnome-utils/gnc-tree-model-account.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -829,7 +829,6 @@
GtkTreeIter *iter)
{
GncTreeModelAccount *model = GNC_TREE_MODEL_ACCOUNT (tree_model);
- GncTreeModelAccountPrivate *priv;
Account *account, *parent;
gint i;
@@ -840,8 +839,6 @@
ENTER("model %p, iter %s", tree_model, iter_to_string(iter));
- priv = GNC_TREE_MODEL_ACCOUNT_GET_PRIVATE(model);
-
parent = (Account *) iter->user_data2;
if (parent == NULL)
{
@@ -929,7 +926,6 @@
GtkTreeIter *iter)
{
GncTreeModelAccount *model;
- GncTreeModelAccountPrivate *priv;
Account *account;
g_return_val_if_fail (GNC_IS_TREE_MODEL_ACCOUNT (tree_model), FALSE);
@@ -937,7 +933,6 @@
ENTER("model %p, iter %s", tree_model, iter_to_string(iter));
model = GNC_TREE_MODEL_ACCOUNT (tree_model);
- priv = GNC_TREE_MODEL_ACCOUNT_GET_PRIVATE(model);
gnc_leave_return_val_if_fail (iter != NULL, FALSE);
gnc_leave_return_val_if_fail (iter->user_data != NULL, FALSE);
@@ -959,14 +954,12 @@
GtkTreeIter *iter)
{
GncTreeModelAccount *model;
- GncTreeModelAccountPrivate *priv;
gint num;
g_return_val_if_fail (GNC_IS_TREE_MODEL_ACCOUNT (tree_model), FALSE);
ENTER("model %p, iter %s", tree_model, iter_to_string(iter));
model = GNC_TREE_MODEL_ACCOUNT (tree_model);
- priv = GNC_TREE_MODEL_ACCOUNT_GET_PRIVATE(model);
if (iter == NULL)
{
@@ -1057,7 +1050,6 @@
GtkTreeIter *child)
{
GncTreeModelAccount *model;
- GncTreeModelAccountPrivate *priv;
Account *account, *parent;
gint i;
@@ -1079,7 +1071,6 @@
gnc_leave_return_val_if_fail (GNC_IS_TREE_MODEL_ACCOUNT (tree_model), FALSE);
model = GNC_TREE_MODEL_ACCOUNT (tree_model);
- priv = GNC_TREE_MODEL_ACCOUNT_GET_PRIVATE(model);
gnc_leave_return_val_if_fail (child != NULL, FALSE);
gnc_leave_return_val_if_fail (child->user_data != NULL, FALSE);
Modified: gnucash/trunk/src/gnome-utils/gnc-tree-model-owner.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-tree-model-owner.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/gnome-utils/gnc-tree-model-owner.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -532,11 +532,9 @@
GValue *value)
{
GncTreeModelOwner *model = GNC_TREE_MODEL_OWNER (tree_model);
- GncTreeModelOwnerPrivate *priv;
GncOwner *owner;
gboolean negative; /* used to set "deficit style" also known as red numbers */
gchar *string = NULL;
- time_t last_date;
g_return_if_fail (GNC_IS_TREE_MODEL_OWNER (model));
g_return_if_fail (iter != NULL);
@@ -547,7 +545,6 @@
iter_to_string(iter), column);
owner = (GncOwner *) iter->user_data;
- priv = GNC_TREE_MODEL_OWNER_GET_PRIVATE(model);
switch (column)
{
Modified: gnucash/trunk/src/gnome-utils/gnc-tree-model-price.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-tree-model-price.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/gnome-utils/gnc-tree-model-price.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -1364,7 +1364,6 @@
GtkTreePath *path;
GtkTreeModel *tree_model;
GtkTreeIter tmp_iter;
- gint i;
ENTER("model %p, iter (%p)%s", model, iter, iter_to_string(model, iter));
Modified: gnucash/trunk/src/gnome-utils/gnc-tree-model.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-tree-model.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/gnome-utils/gnc-tree-model.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -122,16 +122,10 @@
static void
gnc_tree_model_finalize (GObject *object)
{
- GncTreeModel *model;
- GncTreeModelPrivate *priv;
-
ENTER("model %p", object);
g_return_if_fail (object != NULL);
g_return_if_fail (GNC_IS_TREE_MODEL (object));
- model = GNC_TREE_MODEL(object);
- priv = GNC_TREE_MODEL_GET_PRIVATE(model);
-
gnc_gobject_tracking_forget(object);
if (G_OBJECT_CLASS (parent_class)->finalize)
Modified: gnucash/trunk/src/gnome-utils/gnc-tree-view-account.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-tree-view-account.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/gnome-utils/gnc-tree-view-account.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -1471,14 +1471,12 @@
Account *
gnc_tree_view_account_get_cursor_account (GncTreeViewAccount *view)
{
- GtkTreeModel *s_model;
GtkTreePath *s_path;
Account *account;
ENTER("view %p", view);
g_return_val_if_fail (GNC_IS_TREE_VIEW_ACCOUNT (view), NULL);
- s_model = gtk_tree_view_get_model (GTK_TREE_VIEW(view));
gtk_tree_view_get_cursor (GTK_TREE_VIEW(view), &s_path, NULL);
if (!s_path)
{
Modified: gnucash/trunk/src/gnome-utils/gnc-tree-view-commodity.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-tree-view-commodity.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/gnome-utils/gnc-tree-view-commodity.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -124,16 +124,10 @@
static void
gnc_tree_view_commodity_finalize (GObject *object)
{
- GncTreeViewCommodity *view;
- GncTreeViewCommodityPrivate *priv;
-
g_return_if_fail (object != NULL);
g_return_if_fail (GNC_IS_TREE_VIEW_COMMODITY (object));
ENTER("view %p", object);
- view = GNC_TREE_VIEW_COMMODITY (object);
- priv = GNC_TREE_VIEW_COMMODITY_GET_PRIVATE (view);
-
if (G_OBJECT_CLASS (parent_class)->finalize)
(* G_OBJECT_CLASS (parent_class)->finalize) (object);
LEAVE(" ");
@@ -142,13 +136,10 @@
static void
gnc_tree_view_commodity_destroy (GtkObject *object)
{
- GncTreeViewCommodity *view;
-
g_return_if_fail (object != NULL);
g_return_if_fail (GNC_IS_TREE_VIEW_COMMODITY (object));
ENTER("view %p", object);
- view = GNC_TREE_VIEW_COMMODITY (object);
if (GTK_OBJECT_CLASS (parent_class)->destroy)
(* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
@@ -487,6 +478,7 @@
g_free(path_string); \
}
+#if 0 /* Not Used */
static gboolean
gnc_tree_view_commodity_get_iter_from_commodity (GncTreeViewCommodity *view,
gnc_commodity *commodity,
@@ -519,6 +511,7 @@
LEAVE(" ");
return TRUE;
}
+#endif /* Not Used */
/************************************************************/
/* Commodity Tree View Visibility Filter */
@@ -678,6 +671,7 @@
}
+#if 0 /* Not Used */
/*
* This helper function is called once for each row in the tree view
* that is currently selected. Its task is to an the corresponding
@@ -706,3 +700,4 @@
&iter);
*return_list = g_list_append(*return_list, commodity);
}
+#endif /* Not Used */
Modified: gnucash/trunk/src/gnome-utils/gnc-tree-view-owner.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-tree-view-owner.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/gnome-utils/gnc-tree-view-owner.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -66,10 +66,12 @@
GtkTreeIter *iter,
gpointer data);
+#if 0 /* Not Used */
static void gtvo_setup_column_renderer_edited_cb(GncTreeViewOwner *owner_view,
GtkTreeViewColumn *column,
GtkCellRenderer *renderer,
GncTreeViewOwnerColumnTextEdited col_edited_cb);
+#endif /* Not Used */
typedef struct GncTreeViewOwnerPrivate
{
@@ -363,8 +365,6 @@
GtkTreeModel *model, *f_model, *s_model;
const gchar *sample_type, *sample_currency;
GncTreeViewOwnerPrivate *priv;
- GtkTreeViewColumn *tax_info_column;
- GtkCellRenderer *renderer;
ENTER(" ");
/* Create our view */
@@ -517,6 +517,7 @@
g_free(path_string); \
}
+#if 0 /* Not Used */
static GtkTreePath *
gnc_tree_view_owner_get_path_from_owner (GncTreeViewOwner *view,
GncOwner *owner)
@@ -592,6 +593,7 @@
LEAVE(" ");
return TRUE;
}
+#endif /* Not Used */
/************************************************************/
/* Owner Tree View Filter Functions */
@@ -796,7 +798,7 @@
GncOwner *owner)
{
GtkTreeModel *model, *f_model, *s_model;
- GtkTreePath *path, *f_path, *s_path, *parent_path;
+ GtkTreePath *path, *f_path, *s_path;
GtkTreeSelection *selection;
ENTER("view %p, owner %p (%s)", view,
@@ -860,6 +862,7 @@
GncTreeViewOwnerPrivate* priv;
} GncTreeViewSelectionInfo;
+#if 0 /* Not Used */
/*
* This helper function is called once for each row in the tree view
* that is currently selected. Its task is to append the corresponding
@@ -890,6 +893,7 @@
gtvsi->return_list = g_list_append(gtvsi->return_list, owner);
}
}
+#endif /* Not Used */
/************************************************************/
/* Owner Tree View Add Column Functions */
@@ -938,6 +942,8 @@
gtvo_update_column_names (ptr->data);
}
}
+
+#if 0 /* Not Used */
/* This function implements a custom mapping between an owner's KVP
* and the cell renderer's 'text' property. */
static void
@@ -1030,6 +1036,7 @@
g_object_set_data(G_OBJECT(renderer), "column_view", column);
}
}
+#endif /* Not Used */
/* BEGIN FILTER FUNCTIONS */
#define FILTER_TREE_VIEW "types_tree_view"
@@ -1226,7 +1233,6 @@
gpointer user_data)
{
GncOwner *owner;
- GncOwnerType owner_type;
bar_t *bar = user_data;
const gchar *owner_name;
@@ -1296,8 +1302,7 @@
GncOwnerType owner_type)
{
GError *error = NULL;
- gchar *key, *value;
- gint i, count;
+ gchar *value;
gboolean show;
/* Filter information. Ignore missing keys. */
@@ -1335,6 +1340,7 @@
gnc_tree_view_owner_refilter(view);
}
+#if 0 /* Not Used */
static void
gtvo_set_column_editor(GncTreeViewOwner *view,
GtkTreeViewColumn *column,
@@ -1353,3 +1359,4 @@
g_return_if_fail(renderer != NULL);
gtvo_setup_column_renderer_edited_cb(GNC_TREE_VIEW_OWNER(view), column, renderer, edited_cb);
}
+#endif /* Not Used */
Modified: gnucash/trunk/src/gnome-utils/gnc-tree-view-price.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-tree-view-price.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/gnome-utils/gnc-tree-view-price.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -124,16 +124,10 @@
static void
gnc_tree_view_price_finalize (GObject *object)
{
- GncTreeViewPrice *view;
- GncTreeViewPricePrivate *priv;
-
ENTER("view %p", object);
gnc_leave_return_if_fail (object != NULL);
gnc_leave_return_if_fail (GNC_IS_TREE_VIEW_PRICE (object));
- view = GNC_TREE_VIEW_PRICE (object);
- priv = GNC_TREE_VIEW_PRICE_GET_PRIVATE (view);
-
if (G_OBJECT_CLASS (parent_class)->finalize)
(* G_OBJECT_CLASS (parent_class)->finalize) (object);
LEAVE(" ");
@@ -142,14 +136,10 @@
static void
gnc_tree_view_price_destroy (GtkObject *object)
{
- GncTreeViewPrice *view;
-
ENTER("view %p", object);
gnc_leave_return_if_fail (object != NULL);
gnc_leave_return_if_fail (GNC_IS_TREE_VIEW_PRICE (object));
- view = GNC_TREE_VIEW_PRICE (object);
-
if (GTK_OBJECT_CLASS (parent_class)->destroy)
(* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
LEAVE(" ");
@@ -502,6 +492,7 @@
g_free(path_string); \
}
+#if 0 /* Not Used */
static gboolean
gnc_tree_view_price_get_iter_from_price (GncTreeViewPrice *view,
GNCPrice *price,
@@ -534,6 +525,7 @@
LEAVE(" ");
return TRUE;
}
+#endif /* Not Used */
/************************************************************/
/* Price Tree View Filter Functions */
Modified: gnucash/trunk/src/gnome-utils/gnc-tree-view-sx-list.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-tree-view-sx-list.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/gnome-utils/gnc-tree-view-sx-list.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -139,13 +139,9 @@
static void
gnc_tree_view_sx_list_finalize(GObject *object)
{
- GncTreeViewSxList *view;
-
gnc_leave_return_if_fail(object != NULL);
gnc_leave_return_if_fail(GNC_IS_TREE_VIEW_SX_LIST (object));
- view = GNC_TREE_VIEW_SX_LIST(object);
-
if (G_OBJECT_CLASS(parent_class)->finalize)
(* G_OBJECT_CLASS(parent_class)->finalize) (object);
}
Modified: gnucash/trunk/src/gnome-utils/gnc-tree-view.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-tree-view.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/gnome-utils/gnc-tree-view.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -308,18 +308,12 @@
static void
gnc_tree_view_finalize (GObject *object)
{
- GncTreeView *view;
- GncTreeViewPrivate *priv;
-
ENTER("view %p", object);
g_return_if_fail (object != NULL);
g_return_if_fail (GNC_IS_TREE_VIEW (object));
gnc_gobject_tracking_forget(object);
- view = GNC_TREE_VIEW (object);
- priv = GNC_TREE_VIEW_GET_PRIVATE (view);
-
if (G_OBJECT_CLASS (parent_class)->finalize)
G_OBJECT_CLASS (parent_class)->finalize (object);
LEAVE(" ");
@@ -1396,7 +1390,6 @@
GncTreeViewPrivate *priv;
GtkWidget *widget;
const gchar *column_name, *pref_name;
- gulong id;
gchar *key;
// ENTER("view %p, column %p", view, column);
@@ -1436,8 +1429,8 @@
}
/* Set up the callback */
- id = g_signal_connect(widget, "toggled",
- (GCallback)gnc_tree_view_menu_item_toggled, view);
+ g_signal_connect(widget, "toggled",
+ (GCallback)gnc_tree_view_menu_item_toggled, view);
/* Store data on the widget for callbacks */
key = g_strdup_printf("%s_%s", pref_name, GCONF_KEY_VISIBLE);
@@ -1556,7 +1549,7 @@
GncTreeView *view)
{
GncTreeViewPrivate *priv;
- GtkWidget *widget, *menu;
+ GtkWidget *menu;
g_return_if_fail(GTK_IS_TREE_VIEW_COLUMN(column));
g_return_if_fail(GNC_IS_TREE_VIEW(view));
@@ -1575,7 +1568,6 @@
gtk_widget_show_all(menu);
/* Pop the menu up at the button */
- widget = gtk_tree_view_column_get_widget(column);
gtk_menu_popup(GTK_MENU(priv->column_menu), NULL, GTK_WIDGET(menu),
NULL, NULL, 0, gtk_get_current_event_time());
}
@@ -1895,13 +1887,11 @@
GtkTreeIterCompareFunc column_sort_fn,
renderer_toggled toggle_edited_cb)
{
- GncTreeViewPrivate *priv;
GtkTreeViewColumn *column;
GtkCellRenderer *renderer;
g_return_val_if_fail (GNC_IS_TREE_VIEW(view), NULL);
- priv = GNC_TREE_VIEW_GET_PRIVATE(view);
renderer = gtk_cell_renderer_toggle_new ();
column =
gtk_tree_view_column_new_with_attributes (column_short_title,
Modified: gnucash/trunk/src/html/gnc-html-factory.c
===================================================================
--- gnucash/trunk/src/html/gnc-html-factory.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/html/gnc-html-factory.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -33,7 +33,7 @@
#include "gnc-html-factory.h"
/* indicates the debugging module that this .o belongs to. */
-static QofLogModule log_module = GNC_MOD_HTML;
+G_GNUC_UNUSED static QofLogModule log_module = GNC_MOD_HTML;
GncHtml* gnc_html_factory_create_html( void )
{
Modified: gnucash/trunk/src/html/gnc-html-graph-gog-webkit.c
===================================================================
--- gnucash/trunk/src/html/gnc-html-graph-gog-webkit.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/html/gnc-html-graph-gog-webkit.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -235,8 +235,6 @@
gchar** pResult = (gchar**)d;
GncHtmlPieChartInfo pieChartInfo;
GdkPixbuf* pixbuf;
- gchar* p;
- gchar* p_end;
gchar* temp_str;
gchar* base64_buf;
@@ -300,8 +298,6 @@
gchar** pResult = (gchar**)d;
GncHtmlBarChartInfo barChartInfo;
GdkPixbuf* pixbuf;
- gchar* p;
- gchar* p_end;
gchar* temp_str;
gchar* base64_buf;
@@ -381,8 +377,6 @@
gchar** pResult = (gchar**)d;
GncHtmlLineChartInfo lineChartInfo;
GdkPixbuf* pixbuf;
- gchar* p;
- gchar* p_end;
gchar* temp_str;
gchar* base64_buf;
@@ -451,8 +445,6 @@
gchar** pResult = (gchar**)d;
GncHtmlScatterPlotInfo scatterPlotInfo;
GdkPixbuf* pixbuf;
- gchar* p;
- gchar* p_end;
gchar* temp_str;
gchar* base64_buf;
Modified: gnucash/trunk/src/html/gnc-html-graph-gog.c
===================================================================
--- gnucash/trunk/src/html/gnc-html-graph-gog.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/html/gnc-html-graph-gog.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -105,7 +105,6 @@
GogRenderer *renderer;
GdkPixbuf *buf;
- gboolean update_status;
// Note that this shouldn't be necessary as per discussion with Jody...
// ... but it is because we don't embed in a control which passes the
@@ -114,7 +113,7 @@
gog_object_update (GOG_OBJECT (graph));
renderer = GOG_RENDERER(g_object_new( GOG_TYPE_RENDERER, "model", graph, NULL ));
- update_status = gog_renderer_update( renderer, width, height );
+ gog_renderer_update( renderer, width, height );
buf = gog_renderer_get_pixbuf( renderer );
g_object_set_data_full( G_OBJECT(buf), "renderer", renderer, g_object_unref );
Modified: gnucash/trunk/src/html/gnc-html-webkit.c
===================================================================
--- gnucash/trunk/src/html/gnc-html-webkit.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/html/gnc-html-webkit.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -97,8 +97,10 @@
static gboolean gnc_html_object_requested_cb( GtkHTML* html, GtkHTMLEmbedded* eb,
gpointer data );
#endif
+#if 0 /* Not Used */
static int gnc_html_button_press_cb( GtkWidget* widg, GdkEventButton* event,
gpointer user_data );
+#endif /* Not Used */
static void impl_webkit_show_url( GncHtml* self, URLType type,
const gchar* location, const gchar* label,
gboolean new_window_hint );
@@ -502,9 +504,7 @@
}
else
{
- char *fullurl;
-
- fullurl = gnc_build_url( type, location, label );
+ gnc_build_url( type, location, label );
}
}
@@ -662,6 +662,7 @@
* mouse button callback (if any)
********************************************************************/
+#if 0 /* Not Used */
static int
gnc_html_button_press_cb( GtkWidget* widg, GdkEventButton* event,
gpointer user_data )
@@ -680,6 +681,7 @@
return FALSE;
}
}
+#endif /* Not Used */
/********************************************************************
* gnc_html_open_scm
@@ -961,8 +963,6 @@
gnc_html_webkit_new( void )
{
GncHtmlWebkit* self = g_object_new( GNC_TYPE_HTML_WEBKIT, NULL );
- GncHtmlWebkitPrivate* priv = GNC_HTML_WEBKIT_GET_PRIVATE(self);
-
return GNC_HTML(self);
}
Modified: gnucash/trunk/src/html/gnc-html.c
===================================================================
--- gnucash/trunk/src/html/gnc-html.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/html/gnc-html.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -65,12 +65,6 @@
/* hashes an HTML <object classid="ID"> classid to a handler function */
extern GHashTable* gnc_html_object_handlers;
-static char error_404_format[] =
- "<html><body><h3>%s</h3><p>%s</body></html>";
-static char error_404_title[] = N_("Not found");
-static char error_404_body[] =
- N_("The specified URL could not be loaded.");
-
G_DEFINE_ABSTRACT_TYPE(GncHtml, gnc_html, GTK_TYPE_BIN)
static void gnc_html_class_init( GncHtmlClass* klass );
Modified: gnucash/trunk/src/import-export/aqbanking/assistant-ab-initial.c
===================================================================
--- gnucash/trunk/src/import-export/aqbanking/assistant-ab-initial.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/import-export/aqbanking/assistant-ab-initial.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -85,8 +85,9 @@
static gboolean banking_has_accounts(AB_BANKING *banking);
static void hash_from_kvp_acc_cb(Account *gnc_acc, gpointer user_data);
-
+#if AQBANKING_VERSION_INT <= 49908
static void child_exit_cb(GPid pid, gint status, gpointer data);
+#endif
static gchar *ab_account_longname(const AB_ACCOUNT *ab_acc);
static AB_ACCOUNT *update_account_list_acc_cb(AB_ACCOUNT *ab_acc, gpointer user_data);
static void update_account_list(ABInitialInfo *info);
@@ -231,11 +232,12 @@
GtkWidget *page = gtk_assistant_get_nth_page (GTK_ASSISTANT(info->window), num);
AB_BANKING *banking = info->api;
+#if AQBANKING_VERSION_INT <= 49908
GWEN_BUFFER *buf;
gboolean wizard_exists;
const gchar *wizard_path;
gboolean qt_probably_unavailable = FALSE;
-
+#endif /* AQBANKING_VERSION_INT */
g_return_if_fail(banking);
ENTER("user_data: %p", user_data);
@@ -485,6 +487,7 @@
g_hash_table_insert(data->hash, ab_acc, gnc_acc);
}
+#if AQBANKING_VERSION_INT <= 49908
static void
child_exit_cb(GPid pid, gint status, gpointer data)
{
@@ -558,6 +561,7 @@
if (info)
info->deferred_info = NULL;
}
+#endif /* AQBANKING_VERSION_INT <= 49908 */
static gchar *
ab_account_longname(const AB_ACCOUNT *ab_acc)
@@ -691,7 +695,6 @@
GtkTreeViewColumn *col, gpointer user_data)
{
ABInitialInfo *info = user_data;
- GtkTreeSelection *selection;
GtkTreeModel *model;
GtkTreeIter iter;
AB_ACCOUNT *ab_acc;
@@ -706,7 +709,6 @@
PINFO("Row has been double-clicked.");
model = gtk_tree_view_get_model(view);
- selection = gtk_tree_view_get_selection(info->account_view);
if (!gtk_tree_model_get_iter(model, &iter, path))
return; /* path describes a non-existing row - should not happen */
@@ -826,9 +828,6 @@
void aai_on_prepare (GtkAssistant *assistant, GtkWidget *page,
gpointer user_data)
{
- ABInitialInfo *info = user_data;
- gint currentpage = gtk_assistant_get_current_page(assistant);
-
switch (gtk_assistant_get_current_page(assistant))
{
case 1:
Modified: gnucash/trunk/src/import-export/aqbanking/dialog-ab-trans.c
===================================================================
--- gnucash/trunk/src/import-export/aqbanking/dialog-ab-trans.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/import-export/aqbanking/dialog-ab-trans.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -60,10 +60,6 @@
GtkTreePath *path,
GtkTreeIter *iter,
gpointer data);
-static gboolean gnc_ab_trans_dialog_find_templ_helper(GtkTreeModel *model,
- GtkTreePath *path,
- GtkTreeIter *iter,
- gpointer user_data);
static AB_TRANSACTION *gnc_ab_trans_dialog_fill_values(GncABTransDialog *td);
static AB_JOB *gnc_ab_trans_dialog_get_available_empty_job(AB_ACCOUNT *ab_acc,
@@ -230,7 +226,7 @@
const gchar *ab_accountnumber;
const gchar *ab_bankname;
const gchar *ab_bankcode;
- GtkWidget *trans_vbox;
+ G_GNUC_UNUSED GtkWidget *trans_vbox;
GtkWidget *heading_label;
GtkWidget *recp_name_heading;
GtkWidget *recp_account_heading;
@@ -240,7 +236,7 @@
GtkWidget *orig_name_label;
GtkWidget *orig_account_heading;
GtkWidget *orig_account_label;
- GtkWidget *orig_bankname_heading;
+ G_GNUC_UNUSED GtkWidget *orig_bankname_heading;
GtkWidget *orig_bankname_label;
GtkWidget *orig_bankcode_heading;
GtkWidget *orig_bankcode_label;
@@ -573,9 +569,6 @@
AB_JOB *job;
const AB_TRANSACTION_LIMITS *joblimits;
guint8 max_purpose_lines;
- gboolean values_ok;
- gchar *purpose;
- gchar *othername;
/* Check whether the account supports this job */
job = gnc_ab_trans_dialog_get_available_empty_job(td->ab_acc, td->trans_type);
@@ -785,7 +778,6 @@
gpointer user_data)
{
GncABTransDialog *td = user_data;
- GtkTreeModel *model;
GtkTreeIter iter;
GncABTransTempl *templ;
const gchar *old_name, *new_name;
Modified: gnucash/trunk/src/import-export/aqbanking/gnc-ab-getbalance.c
===================================================================
--- gnucash/trunk/src/import-export/aqbanking/gnc-ab-getbalance.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/import-export/aqbanking/gnc-ab-getbalance.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -40,7 +40,7 @@
#include "gnc-ui.h"
/* This static indicates the debugging module that this .o belongs to. */
-static QofLogModule log_module = G_LOG_DOMAIN;
+G_GNUC_UNUSED static QofLogModule log_module = G_LOG_DOMAIN;
void
gnc_ab_getbalance(GtkWidget *parent, Account *gnc_acc)
Modified: gnucash/trunk/src/import-export/aqbanking/gnc-ab-gettrans.c
===================================================================
--- gnucash/trunk/src/import-export/aqbanking/gnc-ab-gettrans.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/import-export/aqbanking/gnc-ab-gettrans.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -42,7 +42,7 @@
#include "gnc-ui.h"
/* This static indicates the debugging module that this .o belongs to. */
-static QofLogModule log_module = G_LOG_DOMAIN;
+G_GNUC_UNUSED static QofLogModule log_module = G_LOG_DOMAIN;
static gboolean gettrans_dates(GtkWidget *parent, Account *gnc_acc, GWEN_TIME **from_date, GWEN_TIME **to_date);
Modified: gnucash/trunk/src/import-export/aqbanking/gnc-ab-kvp.c
===================================================================
--- gnucash/trunk/src/import-export/aqbanking/gnc-ab-kvp.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/import-export/aqbanking/gnc-ab-kvp.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -40,7 +40,7 @@
#define AB_TEMPLATES "template-list"
/* This static indicates the debugging module that this .o belongs to. */
-static QofLogModule log_module = G_LOG_DOMAIN;
+G_GNUC_UNUSED static QofLogModule log_module = G_LOG_DOMAIN;
static kvp_frame *gnc_ab_get_account_kvp(const Account *a, gboolean create);
static kvp_frame *gnc_ab_get_book_kvp(QofBook *b, gboolean create);
Modified: gnucash/trunk/src/import-export/aqbanking/gnc-ab-trans-templ.c
===================================================================
--- gnucash/trunk/src/import-export/aqbanking/gnc-ab-trans-templ.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/import-export/aqbanking/gnc-ab-trans-templ.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -32,7 +32,7 @@
#include "gnc-ab-trans-templ.h"
/* This static indicates the debugging module that this .o belongs to. */
-static QofLogModule log_module = G_LOG_DOMAIN;
+G_GNUC_UNUSED static QofLogModule log_module = G_LOG_DOMAIN;
/* kvp_frame slot names */
#define TT_NAME "name"
Modified: gnucash/trunk/src/import-export/aqbanking/gnc-ab-transfer.c
===================================================================
--- gnucash/trunk/src/import-export/aqbanking/gnc-ab-transfer.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/import-export/aqbanking/gnc-ab-transfer.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -45,7 +45,7 @@
#include "gnc-ui.h"
/* This static indicates the debugging module that this .o belongs to. */
-static QofLogModule log_module = G_LOG_DOMAIN;
+G_GNUC_UNUSED static QofLogModule log_module = G_LOG_DOMAIN;
static void save_templates(GtkWidget *parent, Account *gnc_acc, GList *templates,
gboolean dont_ask);
@@ -84,7 +84,6 @@
AB_BANKING *api;
gboolean online = FALSE;
AB_ACCOUNT *ab_acc;
- GncABTransDialog *dialog = NULL;
GList *templates = NULL;
GncABTransDialog *td = NULL;
gboolean successful = FALSE;
Modified: gnucash/trunk/src/import-export/aqbanking/gnc-ab-utils.c
===================================================================
--- gnucash/trunk/src/import-export/aqbanking/gnc-ab-utils.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/import-export/aqbanking/gnc-ab-utils.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -52,7 +52,7 @@
#endif /* AQBANKING_VERSION_5_PLUS */
/* This static indicates the debugging module that this .o belongs to. */
-static QofLogModule log_module = G_LOG_DOMAIN;
+G_GNUC_UNUSED static QofLogModule log_module = G_LOG_DOMAIN;
/* Global variables for AB_BANKING caching. */
static AB_BANKING *gnc_AB_BANKING = NULL;
@@ -85,7 +85,6 @@
void
gnc_GWEN_Init(void)
{
- gint i;
gchar* gwen_logging = g_strdup(g_getenv("GWEN_LOGLEVEL"));
gchar* aqb_logging = g_strdup(g_getenv("AQBANKING_LOGLEVEL"));
Modified: gnucash/trunk/src/import-export/aqbanking/gnc-gwen-gui.c
===================================================================
--- gnucash/trunk/src/import-export/aqbanking/gnc-gwen-gui.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/import-export/aqbanking/gnc-gwen-gui.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -688,8 +688,6 @@
static void
show_dialog(GncGWENGui *gui, gboolean clear_log)
{
- gboolean cache_pin;
-
g_return_if_fail(gui);
ENTER("gui=%p, clear_log=%d", gui, clear_log);
@@ -740,8 +738,6 @@
show_progress_cb(gpointer user_data)
{
Progress *progress = user_data;
- GncGWENGui *gui;
- GList *item;
g_return_val_if_fail(progress, FALSE);
@@ -987,9 +983,7 @@
GtkWidget *remember_pin_checkbutton;
const gchar *internal_input, *internal_confirmed;
gboolean confirm = (flags & GWEN_GUI_INPUT_FLAGS_CONFIRM) != 0;
- gboolean hidden = (flags & GWEN_GUI_INPUT_FLAGS_SHOW) == 0;
gboolean is_tan = (flags & GWEN_GUI_INPUT_FLAGS_TAN) != 0;
- gint retval;
g_return_if_fail(input);
g_return_if_fail(max_len >= min_len && max_len > 0);
@@ -1215,7 +1209,6 @@
hidebox_cb(GWEN_GUI *gwen_gui, guint32 id)
{
GncGWENGui *gui = GETDATA_GUI(gwen_gui);
- GtkWidget *dialog;
g_return_if_fail(gui && gui->showbox_hash);
Modified: gnucash/trunk/src/import-export/csv-export/assistant-csv-export.c
===================================================================
--- gnucash/trunk/src/import-export/csv-export/assistant-csv-export.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/import-export/csv-export/assistant-csv-export.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -199,10 +199,7 @@
void csv_export_quote_cb (GtkToggleButton *button, gpointer user_data )
{
CsvExportInfo *info = user_data;
- const gchar *name;
- name = gtk_buildable_get_name(GTK_BUILDABLE(button));
-
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(button)))
info->use_quotes = TRUE;
else
@@ -479,7 +476,6 @@
static void
get_filter_times (CsvExportInfo *info)
{
- GtkWidget *button, *today, *gde;
time_t time_val;
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(info->csvd.start_date_choose)))
@@ -770,7 +766,6 @@
csv_export_assistant_prepare (GtkAssistant *assistant, GtkWidget *page,
gpointer user_data)
{
- CsvExportInfo *info = user_data;
gint currentpage = gtk_assistant_get_current_page(assistant);
switch (currentpage)
@@ -856,9 +851,8 @@
GtkWidget *window;
GtkWidget *box;
GtkWidget *button;
- GtkWidget *toggle, *start_date, *end_date, *table, *hbox;
- time_t start_time, end_time, time_val;
- gboolean sensitive, value;
+ GtkWidget *table, *hbox;
+ time_t start_time, end_time;
builder = gtk_builder_new();
gnc_builder_add_from_file (builder , "assistant-csv-export.glade", "CSV Export Assistant");
@@ -1026,19 +1020,13 @@
gnc_file_csv_export (CsvExportType export_type)
{
CsvExportInfo *info;
- gint component_id;
info = g_new0 (CsvExportInfo, 1);
-
info->export_type = export_type;
-
csv_export_assistant_create (info);
-
- component_id = gnc_register_gui_component (ASSISTANT_CSV_EXPORT_CM_CLASS,
- NULL, csv_export_close_handler,
- info);
-
+ gnc_register_gui_component (ASSISTANT_CSV_EXPORT_CM_CLASS,
+ NULL, csv_export_close_handler,
+ info);
gtk_widget_show_all (info->window);
-
gnc_window_adjust_for_screen (GTK_WINDOW(info->window));
}
Modified: gnucash/trunk/src/import-export/csv-export/csv-transactions-export.c
===================================================================
--- gnucash/trunk/src/import-export/csv-export/csv-transactions-export.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/import-export/csv-export/csv-transactions-export.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -76,7 +76,7 @@
{
Query *q;
GSList *p1, *p2;
- GList *splits, *ptr;
+ GList *splits;
QofBook *book;
gchar *end_sep;
@@ -307,7 +307,6 @@
void csv_transactions_export (CsvExportInfo *info)
{
FILE *fh;
- Account *root;
Account *acc;
GList *ptr;
Modified: gnucash/trunk/src/import-export/csv-export/gnc-plugin-csv-export.c
===================================================================
--- gnucash/trunk/src/import-export/csv-export/gnc-plugin-csv-export.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/import-export/csv-export/gnc-plugin-csv-export.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -130,14 +130,8 @@
static void
gnc_plugin_csv_export_finalize (GObject *object)
{
- GncPluginCsvExport *plugin;
- GncPluginCsvExportPrivate *priv;
-
g_return_if_fail (GNC_IS_PLUGIN_CSV_EXPORT (object));
- plugin = GNC_PLUGIN_CSV_EXPORT (object);
- priv = GNC_PLUGIN_CSV_EXPORT_GET_PRIVATE(plugin);
-
G_OBJECT_CLASS (parent_class)->finalize (object);
}
Modified: gnucash/trunk/src/import-export/csv-import/assistant-csv-account-import.c
===================================================================
--- gnucash/trunk/src/import-export/csv-import/assistant-csv-account-import.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/import-export/csv-import/assistant-csv-account-import.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -316,7 +316,6 @@
csv_import_assistant_start_page_prepare (GtkAssistant *assistant,
gpointer user_data)
{
- CsvImportInfo *info = user_data;
gint num = gtk_assistant_get_current_page (assistant);
GtkWidget *page = gtk_assistant_get_nth_page (assistant, num);
@@ -347,8 +346,6 @@
gpointer user_data)
{
CsvImportInfo *info = user_data;
- gint num = gtk_assistant_get_current_page (assistant);
- GtkWidget *page = gtk_assistant_get_nth_page (assistant, num);
gtk_list_store_clear (info->store);
@@ -414,7 +411,6 @@
csv_import_assistant_prepare (GtkAssistant *assistant, GtkWidget *page,
gpointer user_data)
{
- CsvImportInfo *info = user_data;
gint currentpage = gtk_assistant_get_current_page(assistant);
switch (currentpage)
@@ -500,7 +496,6 @@
GtkWidget *window;
GtkWidget *box;
GtkWidget *button;
- GtkTreeIter iter;
GtkCellRenderer *renderer;
GtkTreeViewColumn *column;
@@ -588,15 +583,14 @@
gnc_file_csv_account_import(void)
{
CsvImportInfo *info;
- gint component_id;
info = g_new0 (CsvImportInfo, 1);
csv_import_assistant_create (info);
- component_id = gnc_register_gui_component (ASSISTANT_CSV_IMPORT_CM_CLASS,
- NULL, csv_import_close_handler,
- info);
+ gnc_register_gui_component (ASSISTANT_CSV_IMPORT_CM_CLASS,
+ NULL, csv_import_close_handler,
+ info);
gtk_widget_show_all (info->window);
Modified: gnucash/trunk/src/import-export/csv-import/assistant-csv-trans-import.c
===================================================================
--- gnucash/trunk/src/import-export/csv-import/assistant-csv-trans-import.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/import-export/csv-import/assistant-csv-trans-import.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -725,7 +725,6 @@
static void
select_column (CsvImportTrans* info, int col)
{
- GError* error = NULL;
int colcount = stf_parse_options_fixed_splitpositions_count (info->parse_data->options);
GtkTreeViewColumn *column;
@@ -1090,7 +1089,6 @@
if (info->not_empty)
{
- GList *children, *children_begin;
GList *tv_columns, *tv_columns_begin, *ctv_columns, *ctv_columns_begin;
tv_columns = tv_columns_begin = gtk_tree_view_get_columns(info->treeview);
ctv_columns = ctv_columns_begin = gtk_tree_view_get_columns(info->ctreeview);
@@ -1280,7 +1278,6 @@
csv_import_trans_assistant_start_page_prepare (GtkAssistant *assistant,
gpointer user_data)
{
- CsvImportTrans *info = user_data;
gint num = gtk_assistant_get_current_page (assistant);
GtkWidget *page = gtk_assistant_get_nth_page (assistant, num);
@@ -1316,8 +1313,6 @@
{
CsvImportTrans *info = user_data;
GtkAdjustment *adj;
- gint num = gtk_assistant_get_current_page (assistant);
- GtkWidget *page = gtk_assistant_get_nth_page (assistant, num);
g_signal_connect(G_OBJECT(info->treeview), "size-allocate",
G_CALLBACK(treeview_resized), (gpointer)info);
@@ -1326,7 +1321,6 @@
{
gchar* name;
GtkIconSize size;
- GtkTreeViewColumn* last_col;
/* Block going back */
gtk_assistant_commit (GTK_ASSISTANT(info->window));
@@ -1525,7 +1519,6 @@
csv_import_trans_assistant_prepare (GtkAssistant *assistant, GtkWidget *page,
gpointer user_data)
{
- CsvImportTrans *info = user_data;
gint currentpage = gtk_assistant_get_current_page(assistant);
switch (currentpage)
@@ -1630,9 +1623,6 @@
GtkWidget *window;
GtkWidget *box;
GtkWidget *button, *csv_button;
- GtkTreeIter iter;
- GtkCellRenderer *renderer;
- GtkTreeViewColumn *column;
builder = gtk_builder_new();
gnc_builder_add_from_file (builder , "assistant-csv-trans-import.glade", "start_row_adj");
@@ -1698,7 +1688,6 @@
/* The table containing info->encselector and the separator configuration widgets */
GtkTable* enctable;
- PangoContext* context; /* Used to set a monotype font on info->treeview */
info->start_row_spin = GTK_WIDGET(gtk_builder_get_object (builder, "start_row"));
info->end_row_spin = GTK_WIDGET(gtk_builder_get_object (builder, "end_row"));
@@ -1783,7 +1772,6 @@
/* Load the data treeview and connect it to its resizing event handler. */
info->treeview = (GtkTreeView*)GTK_WIDGET(gtk_builder_get_object (builder, "treeview"));
- context = gtk_widget_create_pango_context(GTK_WIDGET(info->treeview));
/* Load the column type treeview. */
info->ctreeview = (GtkTreeView*)GTK_WIDGET(gtk_builder_get_object (builder, "ctreeview"));
@@ -1831,15 +1819,14 @@
gnc_file_csv_trans_import(void)
{
CsvImportTrans *info;
- gint component_id;
info = g_new0 (CsvImportTrans, 1);
csv_import_trans_assistant_create (info);
- component_id = gnc_register_gui_component (ASSISTANT_CSV_IMPORT_TRANS_CM_CLASS,
- NULL, csv_import_trans_close_handler,
- info);
+ gnc_register_gui_component (ASSISTANT_CSV_IMPORT_TRANS_CM_CLASS,
+ NULL, csv_import_trans_close_handler,
+ info);
gtk_widget_show_all (info->window);
Modified: gnucash/trunk/src/import-export/csv-import/gnc-csv-model.c
===================================================================
--- gnucash/trunk/src/import-export/csv-import/gnc-csv-model.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/import-export/csv-import/gnc-csv-model.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -28,7 +28,7 @@
#include "localtime_r.h"
#endif
-static QofLogModule log_module = GNC_MOD_IMPORT;
+G_GNUC_UNUSED static QofLogModule log_module = GNC_MOD_IMPORT;
const int num_date_formats = 5;
const gchar* date_format_user[] = {N_("y-m-d"),
Modified: gnucash/trunk/src/import-export/csv-import/gnc-plugin-csv-import.c
===================================================================
--- gnucash/trunk/src/import-export/csv-import/gnc-plugin-csv-import.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/import-export/csv-import/gnc-plugin-csv-import.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -131,14 +131,8 @@
static void
gnc_plugin_csv_import_finalize (GObject *object)
{
- GncPluginCsvImport *plugin;
- GncPluginCsvImportPrivate *priv;
-
g_return_if_fail (GNC_IS_PLUGIN_CSV_IMPORT (object));
- plugin = GNC_PLUGIN_CSV_IMPORT (object);
- priv = GNC_PLUGIN_CSV_IMPORT_GET_PRIVATE(plugin);
-
G_OBJECT_CLASS (parent_class)->finalize (object);
}
Modified: gnucash/trunk/src/import-export/import-backend.c
===================================================================
--- gnucash/trunk/src/import-export/import-backend.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/import-export/import-backend.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -1117,7 +1117,6 @@
its parent account. */
gboolean gnc_import_exists_online_id (Transaction *trans)
{
- int i;
gboolean online_id_exists = FALSE;
Account *dest_acct;
Split *source_split;
Modified: gnucash/trunk/src/import-export/import-main-matcher.c
===================================================================
--- gnucash/trunk/src/import-export/import-main-matcher.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/import-export/import-main-matcher.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -154,7 +154,7 @@
GtkTreeRowReference *ref;
GtkTreeIter iter;
GNCImportTransInfo *trans_info;
- GSList *refs_list = NULL, *item;
+ GSList *refs_list = NULL;
g_assert (info);
@@ -235,7 +235,7 @@
{
GNCImportMainMatcher *info = user_data;
GtkBuilder *builder;
- GtkWidget *help_dialog, *box, *closebutton;
+ GtkWidget *help_dialog, *box;
builder = gtk_builder_new();
gnc_builder_add_from_file (builder, "dialog-import.glade", "textbuffer2");
@@ -547,7 +547,7 @@
GNCImportMainMatcher *info;
GtkBuilder *builder;
GtkWidget *heading_label;
- GtkWidget *button, *box, *pbox;
+ GtkWidget *box, *pbox;
gboolean show_update;
info = g_new0 (GNCImportMainMatcher, 1);
@@ -614,7 +614,7 @@
GNCImportMainMatcher *info;
GtkBuilder *builder;
GtkWidget *heading_label;
- GtkWidget *button, *box, *pbox;
+ GtkWidget *box;
gboolean show_update;
info = g_new0 (GNCImportMainMatcher, 1);
Modified: gnucash/trunk/src/import-export/log-replay/gnc-plugin-log-replay.c
===================================================================
--- gnucash/trunk/src/import-export/log-replay/gnc-plugin-log-replay.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/import-export/log-replay/gnc-plugin-log-replay.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -126,14 +126,8 @@
static void
gnc_plugin_log_replay_finalize (GObject *object)
{
- GncPluginLogreplay *plugin;
- GncPluginLogreplayPrivate *priv;
-
g_return_if_fail (GNC_IS_PLUGIN_LOG_REPLAY (object));
- plugin = GNC_PLUGIN_LOG_REPLAY (object);
- priv = GNC_PLUGIN_LOG_REPLAY_GET_PRIVATE(plugin);
-
G_OBJECT_CLASS (parent_class)->finalize (object);
}
Modified: gnucash/trunk/src/import-export/ofx/gnc-ofx-import.c
===================================================================
--- gnucash/trunk/src/import-export/ofx/gnc-ofx-import.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/import-export/ofx/gnc-ofx-import.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -770,7 +770,6 @@
int ofx_proc_account_cb(struct OfxAccountData data, void * account_user_data)
{
- Account *selected_account;
gnc_commodity_table * commodity_table;
gnc_commodity * default_commodity;
GNCAccountType default_type = ACCT_TYPE_NONE;
@@ -837,10 +836,9 @@
"%s \"%s\"",
account_type_name,
data.account_name);
- selected_account = gnc_import_select_account(NULL,
- data.account_id, 1,
- account_description, default_commodity,
- default_type, NULL, NULL);
+ gnc_import_select_account(NULL, data.account_id, 1,
+ account_description, default_commodity,
+ default_type, NULL, NULL);
g_free(account_description);
}
else
Modified: gnucash/trunk/src/import-export/ofx/gnc-ofx-kvp.c
===================================================================
--- gnucash/trunk/src/import-export/ofx/gnc-ofx-kvp.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/import-export/ofx/gnc-ofx-kvp.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -53,7 +53,6 @@
{
kvp_frame * acc_frame;
kvp_value * kvp_val;
- Account *result = NULL;
const GncGUID * income_acc_guid;
g_assert(investment_account);
Modified: gnucash/trunk/src/import-export/ofx/gnc-plugin-ofx.c
===================================================================
--- gnucash/trunk/src/import-export/ofx/gnc-plugin-ofx.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/import-export/ofx/gnc-plugin-ofx.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -124,14 +124,8 @@
static void
gnc_plugin_ofx_finalize (GObject *object)
{
- GncPluginOfx *plugin;
- GncPluginOfxPrivate *priv;
-
g_return_if_fail (GNC_IS_PLUGIN_OFX (object));
- plugin = GNC_PLUGIN_OFX (object);
- priv = GNC_PLUGIN_OFX_GET_PRIVATE(plugin);
-
G_OBJECT_CLASS (parent_class)->finalize (object);
}
Modified: gnucash/trunk/src/import-export/qif-import/assistant-qif-import.c
===================================================================
--- gnucash/trunk/src/import-export/qif-import/assistant-qif-import.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/import-export/qif-import/assistant-qif-import.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -839,7 +839,6 @@
gchar *title = NULL;
const char *str;
GtkWidget *page;
- gint newindex;
char *name_tooltip =
_("Enter a name or short description, such as \"Red Hat Stock\".");
char *mnemonic_tooltip =
@@ -858,7 +857,7 @@
page = retval->page;
/* Insert the new page */
- newindex = gtk_assistant_insert_page (GTK_ASSISTANT(wind->window), page, 14);
+ gtk_assistant_insert_page (GTK_ASSISTANT(wind->window), page, 14);
gtk_assistant_set_page_type(GTK_ASSISTANT(wind->window), page, GTK_ASSISTANT_PAGE_PROGRESS );
gtk_assistant_set_page_complete (GTK_ASSISTANT (wind->window), page, TRUE);
gtk_assistant_update_buttons_state (GTK_ASSISTANT (wind->window));
@@ -1498,10 +1497,6 @@
gnc_ui_qif_import_intro_prepare (GtkAssistant *assistant, gpointer user_data)
{
QIFImportWindow *wind = user_data;
-
- gint num = gtk_assistant_get_current_page (assistant);
- GtkWidget *page = gtk_assistant_get_nth_page (assistant, num);
-
SCM unload = scm_c_eval_string("qif-dialog:unload-qif-file");
SCM files_list;
@@ -1577,7 +1572,6 @@
void
gnc_ui_qif_import_load_file_prepare (GtkAssistant *assistant, gpointer user_data)
{
- QIFImportWindow *wind = user_data;
gint num = gtk_assistant_get_current_page (assistant);
GtkWidget *page = gtk_assistant_get_nth_page (assistant, num);
@@ -2000,7 +1994,6 @@
{
QIFImportWindow *wind = user_data;
- GtkWidget *page;
gint num = gtk_assistant_get_current_page (assistant);
if (wind->ask_date_format)
@@ -2030,7 +2023,6 @@
GtkWidget *page = gtk_assistant_get_nth_page (assistant, num);
SCM reparse_dates = scm_c_eval_string("qif-file:reparse-dates");
- SCM check_from_acct = scm_c_eval_string("qif-file:check-from-acct");
SCM format_sym;
gchar *text;
@@ -2063,7 +2055,6 @@
gnc_ui_qif_import_account_prepare (GtkAssistant *assistant, gpointer user_data)
{
QIFImportWindow * wind = user_data;
- GtkWidget *page;
gint num = gtk_assistant_get_current_page (assistant);
SCM check_from_acct = scm_c_eval_string("qif-file:check-from-acct");
@@ -2169,8 +2160,6 @@
{
QIFImportWindow * wind = user_data;
GtkAssistant *assistant = GTK_ASSISTANT(wind->window);
- GtkWidget *page;
- gint num = gtk_assistant_get_current_page (assistant);
gtk_assistant_set_current_page (assistant, 1);
}
@@ -2542,7 +2531,6 @@
gnc_ui_qif_import_currency_prepare(GtkAssistant *assistant,
gpointer user_data)
{
- QIFImportWindow * wind = user_data;
gint num = gtk_assistant_get_current_page (assistant);
GtkWidget *page = gtk_assistant_get_nth_page (assistant, num);
@@ -2643,7 +2631,6 @@
gnc_ui_qif_import_commodity_new_prepare (GtkAssistant *assistant,
gpointer user_data)
{
- QIFImportWindow *wind = user_data;
gint num = gtk_assistant_get_current_page (assistant);
GtkWidget *page = gtk_assistant_get_nth_page (assistant, num);
@@ -3168,7 +3155,6 @@
gnc_ui_qif_import_end_page_prepare (GtkAssistant *assistant,
gpointer user_data)
{
- QIFImportWindow * wind = user_data;
gint num = gtk_assistant_get_current_page (assistant);
GtkWidget *page = gtk_assistant_get_nth_page (assistant, num);
@@ -3271,7 +3257,6 @@
void gnc_ui_qif_import_prepare_cb (GtkAssistant *assistant, GtkWidget *page,
gpointer user_data)
{
- QIFImportWindow *wind = user_data;
gint currentpage = gtk_assistant_get_current_page(assistant);
GtkWidget *mypage = gtk_assistant_get_nth_page (assistant, currentpage);
const char *pagename = gtk_buildable_get_name(GTK_BUILDABLE(mypage));
Modified: gnucash/trunk/src/import-export/qif-import/gnc-plugin-qif-import.c
===================================================================
--- gnucash/trunk/src/import-export/qif-import/gnc-plugin-qif-import.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/import-export/qif-import/gnc-plugin-qif-import.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -125,14 +125,8 @@
static void
gnc_plugin_qif_import_finalize (GObject *object)
{
- GncPluginQifImport *plugin;
- GncPluginQifImportPrivate *priv;
-
g_return_if_fail (GNC_IS_PLUGIN_QIF_IMPORT (object));
- plugin = GNC_PLUGIN_QIF_IMPORT (object);
- priv = GNC_PLUGIN_QIF_IMPORT_GET_PRIVATE(plugin);
-
G_OBJECT_CLASS (parent_class)->finalize (object);
}
Modified: gnucash/trunk/src/libqof/qof/gnc-date.c
===================================================================
--- gnucash/trunk/src/libqof/qof/gnc-date.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/libqof/qof/gnc-date.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -573,7 +573,7 @@
qof_print_date_time_buff (char * buff, size_t len, time_t secs)
{
int flen;
- int day, month, year, hour, min, sec;
+ int day, month, year, hour, min;
struct tm ltm, gtm;
if (!buff) return 0;
@@ -592,7 +592,6 @@
year = ltm.tm_year + 1900;
hour = ltm.tm_hour;
min = ltm.tm_min;
- sec = ltm.tm_sec;
switch (dateFormat)
{
Modified: gnucash/trunk/src/libqof/qof/kvp_frame.c
===================================================================
--- gnucash/trunk/src/libqof/qof/kvp_frame.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/libqof/qof/kvp_frame.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -700,7 +700,7 @@
return;
}
}
-#if 8
+#if 0 /*decode isn't used*/
/* ============================================================ */
/* decode url-encoded string, do it in place
* + == space
Modified: gnucash/trunk/src/libqof/qof/qof-string-cache.c
===================================================================
--- gnucash/trunk/src/libqof/qof/qof-string-cache.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/libqof/qof/qof-string-cache.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -34,8 +34,9 @@
#include <string.h>
#include "qof.h"
+/* Uncomment if you need to log anything.
static QofLogModule log_module = QOF_MOD_UTIL;
-
+*/
/* =================================================================== */
/* The QOF string cache */
/* */
Modified: gnucash/trunk/src/libqof/qof/qofbackend.c
===================================================================
--- gnucash/trunk/src/libqof/qof/qofbackend.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/libqof/qof/qofbackend.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -33,7 +33,7 @@
#include "qof.h"
#include "qofbackend-p.h"
-static QofLogModule log_module = QOF_MOD_BACKEND;
+G_GNUC_UNUSED static QofLogModule log_module = QOF_MOD_BACKEND;
#define QOF_CONFIG_DESC "desc"
#define QOF_CONFIG_TIP "tip"
Modified: gnucash/trunk/src/libqof/qof/qofbook.c
===================================================================
--- gnucash/trunk/src/libqof/qof/qofbook.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/libqof/qof/qofbook.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -394,7 +394,6 @@
gchar *
qof_book_increment_and_format_counter (QofBook *book, const char *counter_name)
{
- QofBackend *be;
KvpFrame *kvp;
KvpValue *value;
gint64 counter;
Modified: gnucash/trunk/src/libqof/qof/qofchoice.c
===================================================================
--- gnucash/trunk/src/libqof/qof/qofchoice.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/libqof/qof/qofchoice.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -46,10 +46,8 @@
gboolean qof_object_is_choice(QofIdTypeConst type)
{
- gpointer value, check;
+ gpointer value = NULL;
- value = NULL;
- check = NULL;
if (!qof_choice_is_initialized())
{
return FALSE;
Modified: gnucash/trunk/src/libqof/qof/qofevent.c
===================================================================
--- gnucash/trunk/src/libqof/qof/qofevent.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/libqof/qof/qofevent.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -169,15 +169,9 @@
{
GList *node;
GList *next_node = NULL;
- gboolean use_old_handlers = FALSE;
g_return_if_fail(entity);
- if (event_id <= QOF_EVENT__LAST)
- {
- use_old_handlers = TRUE;
- }
-
switch (event_id)
{
case QOF_EVENT_NONE:
Modified: gnucash/trunk/src/libqof/qof/qofinstance.c
===================================================================
--- gnucash/trunk/src/libqof/qof/qofinstance.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/libqof/qof/qofinstance.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -418,13 +418,11 @@
GParamSpec *pspec)
{
QofInstance *inst;
- QofInstancePrivate *priv;
Timespec *ts;
g_return_if_fail(QOF_IS_INSTANCE(object));
inst = QOF_INSTANCE(object);
- priv = GET_PRIVATE(inst);
switch (prop_id)
{
@@ -1009,10 +1007,8 @@
{
QofInstancePrivate *priv;
QofBackend * be;
- gboolean dirty;
priv = GET_PRIVATE(inst);
- dirty = priv->dirty;
/* See if there's a backend. If there is, invoke it. */
be = qof_book_get_backend(priv->book);
Modified: gnucash/trunk/src/libqof/qof/qofquerycore.c
===================================================================
--- gnucash/trunk/src/libqof/qof/qofquerycore.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/libqof/qof/qofquerycore.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -1346,13 +1346,11 @@
QofQueryPredData *pd)
{
query_coll_t pdata;
- QofCollection *coll;
GList *node, *node2, *o_list;
const GncGUID *guid;
pdata = (query_coll_t)pd;
VERIFY_PREDICATE (query_collect_type);
- coll = ((query_collect_getter)getter->param_getfcn) (object, getter);
guid = NULL;
switch (pdata->options)
{
Modified: gnucash/trunk/src/libqof/qof/qofsession.c
===================================================================
--- gnucash/trunk/src/libqof/qof/qofsession.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/libqof/qof/qofsession.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -272,7 +272,6 @@
QofBook *
qof_session_get_book (const QofSession *session)
{
- GList *node;
if (!session) return NULL;
if (!session->book) return NULL;
@@ -323,7 +322,7 @@
}
/* =============================================================== */
-
+#if 0
static void
qof_book_set_partial (QofBook *book)
{
@@ -802,7 +801,7 @@
qof_event_resume ();
return TRUE;
}
-
+#endif
struct recurse_s
{
QofSession *session;
@@ -810,6 +809,7 @@
GList *ref_list;
GList *ent_list;
};
+#if 0 /* recurse_ent_cb, qof_instance_copy_coll_r, and qof_instance_copy_one_r aren't used */
static void
recurse_collection_cb (QofInstance *ent, gpointer user_data)
@@ -999,8 +999,8 @@
}
return success;
}
+#endif
-
/* ====================================================================== */
/** Programs that use their own backends also need to call
@@ -1311,7 +1311,6 @@
GSList *p;
QofBook *book;
int err;
- gint num;
char *msg = NULL;
char *book_id;
Modified: gnucash/trunk/src/libqof/qof/qofutil.c
===================================================================
--- gnucash/trunk/src/libqof/qof/qofutil.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/libqof/qof/qofutil.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -34,7 +34,7 @@
#include "qof.h"
#include "qofbackend-p.h"
-static QofLogModule log_module = QOF_MOD_UTIL;
+G_GNUC_UNUSED static QofLogModule log_module = QOF_MOD_UTIL;
void
g_hash_table_foreach_sorted(GHashTable *hash_table, GHFunc func, gpointer user_data, GCompareFunc compare_func)
@@ -236,7 +236,7 @@
* Else return pointer to first non-whitespace character. */
/* =================================================================== */
-static const gchar *
+G_GNUC_UNUSED static const gchar *
qof_util_whitespace_filter (const gchar * val)
{
size_t len;
Modified: gnucash/trunk/src/libqof/qof/test/test-gnc-date.c
===================================================================
--- gnucash/trunk/src/libqof/qof/test/test-gnc-date.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/libqof/qof/test/test-gnc-date.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -36,12 +36,12 @@
{
} Fixture;
-static void
+G_GNUC_UNUSED static void
setup( Fixture *fixture, gconstpointer pData )
{
}
-static void
+G_GNUC_UNUSED static void
teardown( Fixture *fixture, gconstpointer pData )
{
}
Modified: gnucash/trunk/src/libqof/qof/test/test-qof-string-cache.c
===================================================================
--- gnucash/trunk/src/libqof/qof/test/test-qof-string-cache.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/libqof/qof/test/test-qof-string-cache.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -37,13 +37,13 @@
{
} Fixture;
-static void
+G_GNUC_UNUSED static void
setup( Fixture *fixture, gconstpointer pData )
{
qof_string_cache_init();
}
-static void
+G_GNUC_UNUSED static void
teardown( Fixture *fixture, gconstpointer pData )
{
qof_string_cache_destroy();
@@ -58,7 +58,6 @@
gchar* str1_1;
gchar* str1_2;
gchar* str1_3;
- gchar* str2_1;
gchar* str1_4;
strncpy(str, "str1", sizeof(str));
@@ -72,7 +71,7 @@
qof_string_cache_remove(str); /* Refcount = 1 */
qof_string_cache_remove(str); /* Refcount = 0 */
strncpy(str, "str2", sizeof(str));
- str2_1 = qof_string_cache_insert(str); /* Refcount = 1 */
+ qof_string_cache_insert(str); /* Refcount = 1 */
strncpy(str, "str1", sizeof(str));
str1_4 = qof_string_cache_insert(str); /* Refcount = 1 */
g_assert(str1_1 != str1_4);
Modified: gnucash/trunk/src/libqof/qof/test/test-qofbook.c
===================================================================
--- gnucash/trunk/src/libqof/qof/test/test-qofbook.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/libqof/qof/test/test-qofbook.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -263,11 +263,9 @@
test_book_get_counter_format ( Fixture *fixture, gconstpointer pData )
{
const char *counter_name = "Counter name";
- const char *counter_name_not_set = "Counter name not set";
const char *err_no_book = "No book";
const char *err_invalid_cnt = "Invalid counter name";
gchar *r;
- gint64 counter;
/* need this as long as we have fatal warnings enabled */
g_test_log_set_fatal_handler ( ( GTestLogFatalFunc )handle_faults, NULL );
@@ -291,7 +289,6 @@
g_free( test_struct.msg );
g_test_message( "Testing counter format with existing counter" );
- counter = qof_book_get_counter( fixture->book, counter_name );
r = qof_book_get_counter_format( fixture->book, counter_name );
g_assert_cmpstr( r, == , "%.6" G_GINT64_FORMAT);
@@ -578,7 +575,7 @@
static void
test_book_foreach_collection( Fixture *fixture, gconstpointer pData )
{
- QofCollection *m_col, *m_col2;
+ G_GNUC_UNUSED QofCollection *m_col, *m_col2;
QofIdType my_type = "my_type", my_type2 = "my_type2";
guint param = (guint) g_test_rand_int();
gchar *msg1 = "qof_book_foreach_collection: assertion `book' failed";
Modified: gnucash/trunk/src/libqof/qof/test/test-qofsession.c
===================================================================
--- gnucash/trunk/src/libqof/qof/test/test-qofsession.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/libqof/qof/test/test-qofsession.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -703,7 +703,6 @@
QofSession *session2 = NULL;
QofBackend *be1 = NULL, *be2 = NULL;
QofBook *book1 = NULL, *book2 = NULL;
- GList *node;
/* init */
g_assert (fixture->session);
Modified: gnucash/trunk/src/plugins/bi_import/dialog-bi-import-gui.c
===================================================================
--- gnucash/trunk/src/plugins/bi_import/dialog-bi-import-gui.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/plugins/bi_import/dialog-bi-import-gui.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -84,7 +84,6 @@
BillImportGui *gui;
GtkBuilder *builder;
GList *glist;
- GtkTreeIter iter;
GtkCellRenderer *renderer;
GtkTreeViewColumn *column;
@@ -454,11 +453,8 @@
gnc_info2_dialog (GtkWidget *parent, const gchar *title, const gchar *msg)
{
GtkWidget *dialog, *scrolledwindow, *content_area;
- gint result;
GtkWidget *view;
GtkTextBuffer *buffer;
- gchar *user_input;
- GtkTextIter start, end;
gint width, height;
/* Create the widgets */
Modified: gnucash/trunk/src/plugins/bi_import/dialog-bi-import.c
===================================================================
--- gnucash/trunk/src/plugins/bi_import/dialog-bi-import.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/plugins/bi_import/dialog-bi-import.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -506,7 +506,6 @@
*accumulatesplits;
guint dummy;
GncInvoice *invoice;
- GncOrder *order;
GncEntry *entry;
gint day, month, year;
gnc_numeric n;
@@ -515,7 +514,6 @@
enum update {YES = GTK_RESPONSE_YES, NO = GTK_RESPONSE_NO} update;
GtkWidget *dialog;
Timespec today;
- GncPluginPage *new_page;
InvoiceWindow *iw;
// these arguments are needed
@@ -530,7 +528,6 @@
*n_invoices_updated = 0;
invoice = NULL;
- order = NULL;
update = NO;
valid = gtk_tree_model_get_iter_first (GTK_TREE_MODEL (store), &iter);
@@ -610,7 +607,7 @@
&& strlen(date_posted) == 0))
{
iw = gnc_ui_invoice_edit (invoice);
- new_page = gnc_plugin_page_invoice_new (iw);
+ gnc_plugin_page_invoice_new (iw);
}
}
// I want to warn the user that an existing billvoice exists, but not every
@@ -722,7 +719,6 @@
// handle auto posting of invoices
{
gchar *new_id = NULL;
- Transaction *tnx;
if (valid)
gtk_tree_model_get (GTK_TREE_MODEL (store), &iter, ID, &new_id, -1);
if (g_strcmp0 (id, new_id) != 0)
@@ -737,9 +733,9 @@
d2 = gnc_dmy2timespec (day, month, year);
acc = gnc_account_lookup_for_register
(gnc_get_current_root_account (), account_posted);
- tnx = gncInvoicePostToAccount (invoice, acc, &d1, &d2,
- memo_posted,
- text2bool (accumulatesplits));
+ gncInvoicePostToAccount (invoice, acc, &d1, &d2,
+ memo_posted,
+ text2bool (accumulatesplits));
}
}
g_free (new_id);
Modified: gnucash/trunk/src/plugins/customer_import/dialog-customer-import-gui.c
===================================================================
--- gnucash/trunk/src/plugins/customer_import/dialog-customer-import-gui.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/plugins/customer_import/dialog-customer-import-gui.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -81,7 +81,6 @@
//gktbuilderXML *xml;
GtkBuilder *builder;
GList *glist;
- GtkTreeIter iter;
GtkCellRenderer *renderer;
GtkTreeViewColumn *column;
@@ -432,11 +431,8 @@
gnc_info2_dialog (GtkWidget *parent, const gchar *title, const gchar *msg)
{
GtkWidget *dialog, *scrolledwindow, *content_area;
- gint result;
GtkWidget *view;
GtkTextBuffer *buffer;
- gchar *user_input;
- GtkTextIter start, end;
gint width, height;
/* Create the widgets */
Modified: gnucash/trunk/src/python/gncmod-python.c
===================================================================
--- gnucash/trunk/src/python/gncmod-python.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/python/gncmod-python.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -48,7 +48,9 @@
int
libgncmod_python_gnc_module_init(int refcount)
{
+ /* There isn't yet a python module to init.
PyObject *pName, *pModule;
+ */
FILE *fp;
gchar *pkgdatadir, *init_filename;
@@ -61,7 +63,7 @@
init_sw_core_utils();
#endif
- /*
+ /* There isn't yet a python module to init.
pName = PyString_FromString("path/to/init.py");
pModule = PyImport_Import(pName);
Modified: gnucash/trunk/src/register/ledger-core/split-register-control.c
===================================================================
--- gnucash/trunk/src/register/ledger-core/split-register-control.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/register/ledger-core/split-register-control.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -47,7 +47,6 @@
static gboolean
gnc_split_register_balance_trans (SplitRegister *reg, Transaction *trans)
{
- gnc_numeric imbalance;
int choice;
int default_value;
Account *default_account;
@@ -498,10 +497,8 @@
if (gnc_split_register_find_split (reg, new_trans, new_trans_split,
new_split, new_class, &vcell_loc))
{
- VirtualCell *vcell;
- vcell = gnc_table_get_virtual_cell (reg->table, vcell_loc);
-
+ gnc_table_get_virtual_cell (reg->table, vcell_loc);
new_virt_loc.vcell_loc = vcell_loc;
}
else
@@ -1157,6 +1154,7 @@
return gnc_split_register_get_account_by_name (reg, cell, name);
}
+#if 0 /* Not Used */
static const char *
gnc_split_register_get_cell_string (SplitRegister *reg, const char *cell_name)
{
@@ -1184,6 +1182,7 @@
return ts;
}
+#endif /* Not Used */
/* Creates a transfer dialog and fills its values from register cells (if
* available) or from the provided transaction and split.
Modified: gnucash/trunk/src/register/ledger-core/split-register-load.c
===================================================================
--- gnucash/trunk/src/register/ledger-core/split-register-load.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/register/ledger-core/split-register-load.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -645,7 +645,6 @@
/* restore the cursor to its rightful position */
{
VirtualLocation trans_split_loc;
- Split *trans_split;
if (new_split_row > 0)
save_loc.vcell_loc.virt_row = new_split_row;
@@ -656,9 +655,8 @@
trans_split_loc = save_loc;
- trans_split =
- gnc_split_register_get_trans_split (reg, save_loc.vcell_loc,
- &trans_split_loc.vcell_loc);
+ gnc_split_register_get_trans_split (reg, save_loc.vcell_loc,
+ &trans_split_loc.vcell_loc);
if (dynamic || multi_line || info->trans_expanded)
{
Modified: gnucash/trunk/src/register/register-core/table-allgui.c
===================================================================
--- gnucash/trunk/src/register/register-core/table-allgui.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/register/register-core/table-allgui.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -393,7 +393,6 @@
gboolean *hatching)
{
TableGetBGColorHandler bg_color_handler;
- const char *cell_name;
if (hatching)
*hatching = FALSE;
@@ -401,8 +400,6 @@
if (!table || !table->model)
return 0xffffff; /* white */
- cell_name = gnc_table_get_cell_name (table, virt_loc);
-
bg_color_handler = gnc_table_model_get_bg_color_handler (table->model,
"gtkrc");
if (!bg_color_handler)
@@ -1719,14 +1716,11 @@
gncTableTraversalDir dir,
VirtualLocation *dest_loc)
{
- CellBlock *cb;
gboolean abort_move;
if ((table == NULL) || (dest_loc == NULL))
return FALSE;
- cb = table->current_cursor;
-
ENTER("proposed (%d %d) -> (%d %d)\n",
virt_loc.vcell_loc.virt_row, virt_loc.vcell_loc.virt_row,
dest_loc->vcell_loc.virt_row, dest_loc->vcell_loc.virt_col);
Modified: gnucash/trunk/src/register/register-gnome/gnucash-cursor.c
===================================================================
--- gnucash/trunk/src/register/register-gnome/gnucash-cursor.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/register/register-gnome/gnucash-cursor.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -298,14 +298,12 @@
static void
gnucash_cursor_set_cell (GnucashCursor *cursor, gint cell_row, gint cell_col)
{
- GnucashSheet *sheet;
GnucashItemCursor *item_cursor;
SheetBlockStyle *style;
g_return_if_fail (cursor != NULL);
g_return_if_fail (GNUCASH_IS_CURSOR (cursor));
- sheet = cursor->sheet;
item_cursor = GNUCASH_ITEM_CURSOR(cursor->cursor[GNUCASH_CURSOR_CELL]);
style = cursor->style;
@@ -395,15 +393,13 @@
static void
-gnucash_item_cursor_class_init (GnucashItemCursorClass *class)
+gnucash_item_cursor_class_init (GnucashItemCursorClass *klass)
{
- GObjectClass *object_class;
GnomeCanvasItemClass *item_class;
- object_class = G_OBJECT_CLASS (class);
- item_class = GNOME_CANVAS_ITEM_CLASS (class);
+ item_class = GNOME_CANVAS_ITEM_CLASS (klass);
- gnucash_item_cursor_parent_class = g_type_class_peek_parent (class);
+ gnucash_item_cursor_parent_class = g_type_class_peek_parent (klass);
/* GnomeCanvasItem method overrides */
item_class->draw = gnucash_item_cursor_draw;
@@ -446,10 +442,8 @@
const GValue *value,
GParamSpec *pspec)
{
- GnomeCanvasItem *item;
GnucashCursor *cursor;
- item = GNOME_CANVAS_ITEM (object);
cursor = GNUCASH_CURSOR (object);
switch (prop_id)
@@ -474,12 +468,8 @@
GValue *value,
GParamSpec *pspec)
{
- GnomeCanvasItem *item;
- GnucashCursor *cursor;
+ GnucashCursor *cursor = GNUCASH_CURSOR (object);
- item = GNOME_CANVAS_ITEM (object);
- cursor = GNUCASH_CURSOR (object);
-
switch (prop_id)
{
case PROP_SHEET:
Modified: gnucash/trunk/src/register/register-gnome/gnucash-grid.c
===================================================================
--- gnucash/trunk/src/register/register-gnome/gnucash-grid.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/register/register-gnome/gnucash-grid.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -776,12 +776,8 @@
const GValue *value,
GParamSpec *pspec)
{
- GnomeCanvasItem *item;
- GnucashGrid *grid;
+ GnucashGrid *grid = GNUCASH_GRID (object);
- item = GNOME_CANVAS_ITEM (object);
- grid = GNUCASH_GRID (object);
-
switch (prop_id)
{
case PROP_SHEET:
@@ -800,12 +796,8 @@
GValue *value,
GParamSpec *pspec)
{
- GnomeCanvasItem *item;
- GnucashGrid *grid;
+ GnucashGrid *grid = GNUCASH_GRID (object);
- item = GNOME_CANVAS_ITEM (object);
- grid = GNUCASH_GRID (object);
-
switch (prop_id)
{
case PROP_SHEET:
Modified: gnucash/trunk/src/register/register-gnome/gnucash-header.c
===================================================================
--- gnucash/trunk/src/register/register-gnome/gnucash-header.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/register/register-gnome/gnucash-header.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -292,7 +292,6 @@
gnc_header_reconfigure (GncHeader *header)
{
GnomeCanvas *canvas;
- GtkWidget *widget;
GnucashSheet *sheet;
SheetBlockStyle *old_style;
int w, h;
@@ -301,7 +300,6 @@
g_return_if_fail (GNC_IS_HEADER (header));
canvas = GNOME_CANVAS_ITEM(header)->canvas;
- widget = GTK_WIDGET (header->sheet);
sheet = GNUCASH_SHEET(header->sheet);
old_style = header->style;
Modified: gnucash/trunk/src/register/register-gnome/gnucash-item-edit.c
===================================================================
--- gnucash/trunk/src/register/register-gnome/gnucash-item-edit.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/register/register-gnome/gnucash-item-edit.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -172,8 +172,6 @@
{
const char LINE_FEED = 0x0a;
- SheetBlock *block;
- SheetBlockStyle *style;
GtkEditable *editable;
Table *table;
@@ -190,12 +188,8 @@
GnucashSheet *sheet;
sheet = GNUCASH_SHEET (item_edit->sheet);
- style = item_edit->style;
table = item_edit->sheet->table;
- block = gnucash_sheet_get_block (item_edit->sheet,
- item_edit->virt_loc.vcell_loc);
-
if (item_edit->sheet->use_theme_colors)
{
color_type = gnc_table_get_gtkrc_bg_color (table,
@@ -479,10 +473,6 @@
static void
gnc_item_edit_unrealize (GnomeCanvasItem *item)
{
- GncItemEdit *item_edit;
-
- item_edit = GNC_ITEM_EDIT (item);
-
if (GNOME_CANVAS_ITEM_CLASS (gnc_item_edit_parent_class)->unrealize)
(*GNOME_CANVAS_ITEM_CLASS
(gnc_item_edit_parent_class)->unrealize) (item);
@@ -672,7 +662,7 @@
GtkEditable *editable;
Table *table;
gint pos = 0;
- gint o_x, o_y;
+ gint o_x;
CellDimensions *cd;
gint cell_row, cell_col;
SheetBlockStyle *style;
@@ -697,7 +687,6 @@
gnc_item_edit_reset_offset (item_edit);
o_x = cd->origin_x + item_edit->x_offset;
- o_y = cd->origin_y;
if (changed_cells)
{
@@ -713,14 +702,14 @@
{
PangoLayout *layout;
int textByteIndex, textIndex, textTrailing;
- gboolean insideText;
const gchar *text;
- layout = gtk_entry_get_layout( GTK_ENTRY(item_edit->editor) );
+ layout = gtk_entry_get_layout (GTK_ENTRY(item_edit->editor));
text = pango_layout_get_text (layout);
- insideText = pango_layout_xy_to_index( layout,
- ((x - o_x) - CELL_HPADDING) * PANGO_SCALE, 10 * PANGO_SCALE,
- &textByteIndex, &textTrailing );
+ pango_layout_xy_to_index (layout,
+ ((x - o_x) - CELL_HPADDING) * PANGO_SCALE,
+ 10 * PANGO_SCALE, &textByteIndex,
+ &textTrailing);
textIndex = (int) g_utf8_pointer_to_offset (text, text + textByteIndex);
pos = textIndex + textTrailing;
}
Modified: gnucash/trunk/src/register/register-gnome/gnucash-sheet.c
===================================================================
--- gnucash/trunk/src/register/register-gnome/gnucash-sheet.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/register/register-gnome/gnucash-sheet.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -381,7 +381,6 @@
void
gnucash_sheet_compute_visible_range (GnucashSheet *sheet)
{
- Table *table;
VirtualCellLocation vcell_loc;
gint height;
gint cy;
@@ -390,7 +389,6 @@
g_return_if_fail (sheet != NULL);
g_return_if_fail (GNUCASH_IS_SHEET (sheet));
- table = sheet->table;
height = GTK_WIDGET(sheet)->allocation.height;
gnome_canvas_get_scroll_offsets (GNOME_CANVAS(sheet), NULL, &cy);
@@ -865,7 +863,6 @@
GString *change_text_gs;
int new_text_len;
- int old_text_len;
int change_text_len;
const char *old_text;
@@ -902,7 +899,6 @@
old_text = gtk_entry_get_text (GTK_ENTRY(sheet->entry));
if (old_text == NULL)
old_text = "";
- old_text_len = strlen (old_text);
old_position = *position;
@@ -1205,15 +1201,12 @@
static void
gnucash_sheet_start_editing_at_cursor (GnucashSheet *sheet)
{
- GnomeCanvas *canvas;
const char *text;
VirtualLocation virt_loc;
g_return_if_fail (sheet != NULL);
g_return_if_fail (GNUCASH_IS_SHEET (sheet));
- canvas = GNOME_CANVAS(sheet);
-
gnucash_cursor_get_virt (GNUCASH_CURSOR(sheet->cursor), &virt_loc);
text = gnc_table_get_entry (sheet->table, virt_loc);
@@ -1720,7 +1713,6 @@
{
Table *table;
GnucashSheet *sheet;
- CellBlock *header;
gboolean pass_on = FALSE;
gboolean abort_move;
VirtualLocation cur_virt_loc;
@@ -1734,7 +1726,6 @@
sheet = GNUCASH_SHEET (widget);
table = sheet->table;
- header = gnc_table_get_header_cell(table)->cellblock;
if (gnucash_sheet_direct_event(sheet, (GdkEvent *) event))
return TRUE;
@@ -1876,7 +1867,6 @@
gnucash_sheet_key_press_event (GtkWidget *widget, GdkEventKey *event)
{
GnucashSheet *sheet;
- gint result;
g_return_val_if_fail(widget != NULL, TRUE);
g_return_val_if_fail(GNUCASH_IS_SHEET(widget), TRUE);
@@ -1964,7 +1954,7 @@
GnucashSheet *sheet)
{
GtkEditable *editable;
- gint tmp_pos, length, sel_start, sel_end;
+ gint tmp_pos, sel_start, sel_end;
g_return_if_fail(strlen(str) > 0);
g_return_if_fail(sheet->editing == TRUE);
@@ -2680,11 +2670,9 @@
{
GObjectClass *gobject_class;
GtkWidgetClass *widget_class;
- GnomeCanvasClass *canvas_class;
gobject_class = G_OBJECT_CLASS (class);
widget_class = GTK_WIDGET_CLASS (class);
- canvas_class = GNOME_CANVAS_CLASS (class);
sheet_parent_class = g_type_class_peek_parent (class);
@@ -2795,7 +2783,6 @@
gnucash_sheet_new (Table *table)
{
GnucashSheet *sheet;
- GnomeCanvas *sheet_canvas;
GnomeCanvasItem *item;
GnomeCanvasGroup *sheet_group;
@@ -2804,7 +2791,6 @@
sheet = gnucash_sheet_create (table);
/* handy shortcuts */
- sheet_canvas = GNOME_CANVAS (sheet);
sheet_group = gnome_canvas_root (GNOME_CANVAS(sheet));
/* The grid */
@@ -2856,12 +2842,8 @@
gnucash_register_class_init (GnucashRegisterClass *class)
{
GObjectClass *gobject_class;
- GtkWidgetClass *widget_class;
- GtkTableClass *table_class;
gobject_class = G_OBJECT_CLASS (class);
- widget_class = (GtkWidgetClass *) class;
- table_class = (GtkTableClass *) class;
register_parent_class = g_type_class_peek_parent (class);
Modified: gnucash/trunk/src/report/report-gnome/dialog-custom-report.c
===================================================================
--- gnucash/trunk/src/report/report-gnome/dialog-custom-report.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/report/report-gnome/dialog-custom-report.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -139,7 +139,6 @@
create_and_fill_report_list(CustomReportDialog *crd)
{
GtkListStore *store;
- GtkTreeIter iter;
store = gtk_list_store_new(NUM_COLS, G_TYPE_STRING, G_TYPE_INT);
@@ -276,16 +275,11 @@
delete_custom_report_clicked_cb(GtkWidget *button, gpointer data)
{
CustomReportDialog *crd = data;
- GtkTreeSelection *sel;
- GtkTreeModel *model;
- GtkTreeIter iter;
SCM template_menu_name = scm_c_eval_string("gnc:report-template-menu-name/report-guid");
SCM guid;
gchar* report_name;
- sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(crd->reportview));
-
guid = get_custom_report_selection(crd, _("You must select a report to delete."));
if (!scm_is_null(guid))
{
Modified: gnucash/trunk/src/report/report-gnome/gnc-plugin-page-report.c
===================================================================
--- gnucash/trunk/src/report/report-gnome/gnc-plugin-page-report.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/report/report-gnome/gnc-plugin-page-report.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -314,15 +314,9 @@
static void
gnc_plugin_page_report_finalize (GObject *object)
{
- GncPluginPageReport *page;
- GncPluginPageReportPrivate *priv;
-
g_return_if_fail (GNC_IS_PLUGIN_PAGE_REPORT (object));
ENTER("object %p", object);
- page = GNC_PLUGIN_PAGE_REPORT (object);
- priv = GNC_PLUGIN_PAGE_REPORT_GET_PRIVATE(page);
-
G_OBJECT_CLASS (parent_class)->finalize (object);
LEAVE(" ");
}
Modified: gnucash/trunk/src/report/stylesheets/gnc-plugin-stylesheets.c
===================================================================
--- gnucash/trunk/src/report/stylesheets/gnc-plugin-stylesheets.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/report/stylesheets/gnc-plugin-stylesheets.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -134,14 +134,8 @@
static void
gnc_plugin_stylesheets_finalize (GObject *object)
{
- GncPluginStylesheets *plugin;
- GncPluginStylesheetsPrivate *priv;
-
g_return_if_fail (GNC_IS_PLUGIN_STYLESHEETS (object));
- plugin = GNC_PLUGIN_STYLESHEETS (object);
- priv = GNC_PLUGIN_STYLESHEETS_GET_PRIVATE(plugin);
-
G_OBJECT_CLASS (parent_class)->finalize (object);
}
Modified: gnucash/trunk/src/test-core/unittest-support.c
===================================================================
--- gnucash/trunk/src/test-core/unittest-support.c 2012-05-26 23:46:58 UTC (rev 22202)
+++ gnucash/trunk/src/test-core/unittest-support.c 2012-05-26 23:47:34 UTC (rev 22203)
@@ -52,7 +52,7 @@
guint i = 0, last = 0, max_bit = 7;
gchar *msg = NULL;
- for (i; i <= max_bit; i++)
+ for (i = 0; i <= max_bit; i++)
if (flags & 1 << i)
{
gchar *tmp_msg = msg;
More information about the gnucash-changes
mailing list