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)

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22203 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
John Ralls
2012-05-26 23:47:34 +00:00
parent 894f0ed126
commit b391754ff6
202 changed files with 297 additions and 1005 deletions

View File

@@ -1795,7 +1795,6 @@ Amortization_Schedule (amort_sched_ptr amortsched)
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 @@ Amortization_Schedule (amort_sched_ptr amortsched)
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:

View File

@@ -69,8 +69,6 @@ gncFindFile (const char * filename)
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 @@ gnc_find_state_file (const gchar *url,
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;

View File

@@ -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 @@ static void address_cb(gpointer data, gpointer user_data)
* 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);

View File

@@ -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
{

View File

@@ -86,6 +86,7 @@ gnc_euro_rate_compare (const void * key, const void * value)
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 @@ gnc_euro_rate_compare_code (const void * key, const void * value)
return g_ascii_strcasecmp (code, euro->currency);
}
#endif
/* ------------------------------------------------------ */

View File

@@ -688,10 +688,8 @@ _gnc_sx_instance_event_handler(QofInstance *ent, QofEventId event_type, gpointer
}
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 @@ create_cashflow_helper(Transaction *template_txn, void *user_data)
{
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 @@ create_cashflow_helper(Transaction *template_txn, void *user_data)
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;
}

View File

@@ -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

View File

@@ -767,6 +767,7 @@ gnc_account_create_opening_balance (Account *account,
return TRUE;
}
#if 0 /* Not Used */
static void
gnc_lconv_set_utf8 (char **p_value, char *default_value)
{
@@ -810,7 +811,7 @@ gnc_lconv_set_char (char *p_value, char default_value)
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 @@ PrintAmountInternal(char *buf, gnc_numeric val, const GNCPrintAmountInfo *info)
/* 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);

View File

@@ -1099,7 +1099,6 @@ gnc_trans_scm_get_num_splits(SCM trans_scm)
char *
gnc_get_debit_string(GNCAccountType account_type)
{
const gchar *string;
SCM result;
SCM arg;
@@ -1131,7 +1130,6 @@ gnc_get_debit_string(GNCAccountType account_type)
char *
gnc_get_credit_string(GNCAccountType account_type)
{
const gchar *string;
SCM result;
SCM arg;

View File

@@ -221,8 +221,6 @@ create_tables_cb( const gchar* type, gpointer data_p, gpointer be_p )
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 @@ conn_table_operation( GncSqlConnection *sql_conn, GSList *table_name_list,
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 @@ gnc_dbi_sync_all( QofBackend* qbe, /*@ dependent @*/ QofBook *book )
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 @@ gnc_dbi_sync_all( QofBackend* qbe, /*@ dependent @*/ QofBook *book )
LEAVE( "book=%p", book );
}
#endif
/**
* Safely resave a database by renaming all of its tables, recreating
@@ -1570,7 +1569,6 @@ gnc_dbi_safe_sync_all( QofBackend *qbe, QofBook *book )
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 @@ gnc_dbi_check_sqlite3_file( const gchar *uri )
{
FILE* f;
gchar buf[50];
size_t chars_read;
gint status;
gchar *filename;
@@ -1776,7 +1773,7 @@ gnc_dbi_check_sqlite3_file( const gchar *uri )
}
// 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 @@ conn_create_statement_from_sql( /*@ observer @*/ GncSqlConnection* conn, const g
return create_dbi_statement( conn, sql );
}
#if 0 /* Not Used */
static GValue*
create_gvalue_from_string( /*@ only @*/ gchar* s )
{
@@ -2320,6 +2318,7 @@ create_gvalue_from_string( /*@ only @*/ gchar* s )
return s_gval;
}
#endif
static gboolean
conn_does_table_exist( GncSqlConnection* conn, const gchar* table_name )
@@ -2483,7 +2482,6 @@ add_columns_ddl( GncSqlConnection* conn,
{
GString* ddl;
const GList* list_node;
const GncSqlColumnTableEntry* table_row;
guint col_num;
GncDbiSqlConnection* dbi_conn = (GncDbiSqlConnection*)conn;
@@ -2821,7 +2819,6 @@ conn_create_index( /*@ unused @*/ GncSqlConnection* conn, /*@ unused @*/ const g
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 @@ conn_add_columns_to_table( /*@ unused @*/ GncSqlConnection* conn, /*@ unused @*/
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 @@ conn_get_table_list( dbi_conn conn, const gchar* dbname )
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 ) );

View File

@@ -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 )

View File

@@ -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 )

View File

@@ -92,9 +92,6 @@ create_business_session(void)
GncAddress* addr;
GncCustomer* cust;
GncEmployee* emp;
GncVendor* v;
GncInvoice* inv;
GncJob* job;
GncTaxTable* tt;
GncTaxTableEntry* tte;
@@ -158,7 +155,7 @@ create_business_session(void)
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 */

View File

@@ -201,7 +201,6 @@ load_all_accounts( GncSqlBackend* be )
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 @@ load_all_accounts( GncSqlBackend* be )
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 @@ load_all_accounts( GncSqlBackend* be )
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 );

View File

@@ -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 @@ add_address_col_info_to_list( const GncSqlBackend* be, const GncSqlColumnTableEn
GncSqlColumnInfo* info;
gchar* buf;
const GncSqlColumnTableEntry* subtable_row;
const gchar* type;
g_return_if_fail( be != NULL );
g_return_if_fail( table_row != NULL );

View File

@@ -806,7 +806,7 @@ handle_and_term( QofQueryTerm* pTerm, GString* sql )
}
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 @@ gchar*
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 @@ add_gvalue_guid_to_slist( const GncSqlBackend* be, QofIdTypeConst obj_name,
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 @@ add_gvalue_guid_to_slist( const GncSqlBackend* be, QofIdTypeConst obj_name,
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 @@ add_gvalue_guid_to_slist( const GncSqlBackend* be, QofIdTypeConst obj_name,
(*pList) = g_slist_append( (*pList), value );
#if 0
if ( free_guid )
{
g_free( guid );
}
#endif
}
static GncSqlColumnTypeHandler guid_handler
@@ -3276,9 +3266,7 @@ gnc_sql_init_version_info( GncSqlBackend* be )
}
else
{
gboolean ok;
ok = do_create_table( be, VERSION_TABLE_NAME, version_table );
do_create_table( be, VERSION_TABLE_NAME, version_table );
}
}

View File

@@ -225,12 +225,9 @@ load_all_billterms( GncSqlBackend* be )
{
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 @@ load_all_billterms( GncSqlBackend* be )
if ( l_billterms_needing_parents != NULL )
{
gboolean progress_made = TRUE;
GncTaxTable* root;
Account* pParent;
GList* elem;
while ( progress_made )

View File

@@ -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 @@ set_root_template_guid( gpointer pObject, /*@ null @*/ gpointer pValue )
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 )

View File

@@ -110,11 +110,9 @@ load_all_customers( GncSqlBackend* be )
{
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 );

View File

@@ -98,14 +98,9 @@ load_all_employees( GncSqlBackend* be )
{
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 );

View File

@@ -175,12 +175,9 @@ load_all_entries( GncSqlBackend* be )
{
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 );

View File

@@ -118,12 +118,9 @@ load_all_invoices( GncSqlBackend* be )
{
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 );

View File

@@ -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 @@ load_all_jobs( GncSqlBackend* be )
{
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 );

View File

@@ -129,12 +129,11 @@ load_all_lots( GncSqlBackend* be )
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 );

View File

@@ -92,12 +92,9 @@ load_all_orders( GncSqlBackend* be )
{
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 );

View File

@@ -170,7 +170,6 @@ add_owner_col_info_to_list( const GncSqlBackend* be, const GncSqlColumnTableEntr
{
GncSqlColumnInfo* info;
gchar* buf;
const gchar* type;
g_return_if_fail( be != NULL );
g_return_if_fail( table_row != NULL );

View File

@@ -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

View File

@@ -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

View File

@@ -209,7 +209,7 @@ get_key_from_path( GString *path )
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 );

View File

@@ -54,7 +54,6 @@ typedef struct
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 @@ set_obj_guid( gpointer pObject, gpointer pValue )
{
// Nowhere to put the GncGUID
}
#if 0 /* Not Used */
static gpointer
get_child( gpointer pObject, const QofParam* param )
{
@@ -151,6 +150,7 @@ get_child( gpointer pObject, const QofParam* param )
return gncTaxTableGetChild( tt );
}
#endif
static /*@ null @*//*@ dependent @*/ gpointer
bt_get_parent( gpointer pObject )
@@ -234,7 +234,6 @@ load_taxtable_entries( GncSqlBackend* be, GncTaxTable* tt )
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 @@ load_all_taxtables( GncSqlBackend* be )
if ( tt_needing_parents != NULL )
{
gboolean progress_made = TRUE;
GncTaxTable* root;
Account* pParent;
GList* elem;
while ( progress_made )

View File

@@ -89,7 +89,6 @@ static const GncSqlColumnTableEntry tx_col_table[] =
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 @@ set_split_reconcile_state( gpointer pObject, /*@ null @*/ gpointer pValue )
xaccSplitSetReconcile( GNC_SPLIT(pObject), s[0] );
}
#if 0 /* Not Used */
static void
set_split_reconcile_date( gpointer pObject, Timespec ts )
{
@@ -177,6 +176,7 @@ set_split_reconcile_date( gpointer pObject, Timespec ts )
xaccSplitSetDateReconciledTS( GNC_SPLIT(pObject), &ts );
}
#endif
static void
set_split_lot( gpointer pObject, /*@ null @*/ gpointer pLot )
@@ -319,6 +319,7 @@ typedef struct
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 @@ save_account_balances( Account* acc, gpointer pData )
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 @@ query_transactions( GncSqlBackend* be, GncSqlStatement* stmt )
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 @@ save_transaction( GncSqlBackend* be, Transaction* pTx, gboolean do_save_splits )
}
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 @@ commit_transaction( GncSqlBackend* be, QofInstance* inst )
}
/* ================================================================= */
#if 0 /* Not Used */
static /*@ dependent @*//*@ null @*/ const GncGUID*
get_guid_from_query( QofQuery* pQuery )
{
@@ -849,7 +851,7 @@ get_guid_from_query( QofQuery* pQuery )
return NULL;
}
}
#endif
/**
* Loads all transactions for an account.
*
@@ -946,15 +948,12 @@ convert_query_comparison_to_sql( QofQueryPredData* pPredData, gboolean isInverte
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 @@ typedef struct
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 @@ compile_split_query( GncSqlBackend* be, QofQuery* query )
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 @@ compile_split_query( GncSqlBackend* be, QofQuery* query )
}
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 @@ done_compiling_query:
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 @@ run_split_query( GncSqlBackend* be, gpointer pQuery )
}
}
static void
G_GNUC_UNUSED static void
free_split_query( GncSqlBackend* be, gpointer pQuery )
{
g_return_if_fail( be != NULL );
@@ -1370,7 +1370,7 @@ static const GncSqlColumnTableEntry acct_balances_col_table[] =
/*@ +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;

View File

@@ -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 @@ load_all_vendors( GncSqlBackend* be )
{
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 );

View File

@@ -475,14 +475,12 @@ gnc_account_end_handler(gpointer data_for_children,
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)
{

View File

@@ -453,13 +453,11 @@ gnc_billterm_end_handler(gpointer data_for_children,
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)
{

View File

@@ -102,7 +102,7 @@ xmlNodePtr
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 @@ gnc_book_end_handler(gpointer data_for_children,
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;

View File

@@ -423,13 +423,11 @@ gnc_customer_end_handler(gpointer data_for_children,
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)
{

View File

@@ -346,13 +346,11 @@ gnc_employee_end_handler(gpointer data_for_children,
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)
{

View File

@@ -753,13 +753,11 @@ gnc_entry_end_handler(gpointer data_for_children,
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)
{

View File

@@ -409,9 +409,6 @@ static
gboolean
fs_guid_handler( xmlNodePtr node, gpointer data)
{
fsParseData *fspd = data;
GncGUID *guid;
guid = dom_tree_to_guid( node );
return TRUE;
}

View File

@@ -466,14 +466,11 @@ gnc_invoice_end_handler(gpointer data_for_children,
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;

View File

@@ -239,14 +239,11 @@ gnc_job_end_handler(gpointer data_for_children,
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;

View File

@@ -133,14 +133,11 @@ gnc_lot_end_handler(gpointer data_for_children,
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;

View File

@@ -282,14 +282,11 @@ gnc_order_end_handler(gpointer data_for_children,
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;

View File

@@ -415,14 +415,11 @@ gnc_taxtable_end_handler(gpointer data_for_children,
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;

View File

@@ -579,7 +579,6 @@ gnc_transaction_end_handler(gpointer data_for_children,
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 @@ gnc_transaction_end_handler(gpointer data_for_children,
if (trn != NULL)
{
gdata->cb(tag, gdata->parsedata, trn);
successful = TRUE;
}
xmlFreeNode(tree);

View File

@@ -367,14 +367,11 @@ gnc_vendor_end_handler(gpointer data_for_children,
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;

View File

@@ -1937,10 +1937,9 @@ commodity_restore_after_child_handler(gpointer data_for_children,
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;

View File

@@ -375,7 +375,6 @@ test_transaction(void)
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 @@ test_transaction(void)
/* 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)

View File

@@ -93,6 +93,7 @@ gnc_print_unstable_message(void)
_("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 gchar *environment_expand(gchar *param)
static void
environment_override()
{
const gchar *path;
gchar *config_path;
gchar *env_file;
GKeyFile *keyfile = g_key_file_new();
@@ -269,7 +269,7 @@ environment_override()
g_key_file_free(keyfile);
}
#ifdef MAC_INTEGRATION
#else /* MAC_INTEGRATION */
static void
set_mac_locale()
{

View File

@@ -316,7 +316,6 @@ gnc_account_select_combo_fill (GtkWidget *combo, QofBook *book,
GList *acct_types, GList *acct_commodities)
{
GtkListStore *store;
GtkEntry *entry;
GList *list, *node;
char *text;
@@ -554,7 +553,6 @@ gnc_taxtables_combo (GtkComboBox *cbox, QofBook *book,
void
gnc_taxincluded_combo (GtkComboBox *cbox, GncTaxIncluded initial_choice)
{
GtkWidget *menu;
GtkListStore *liststore;
if (!cbox) return;

View File

@@ -451,7 +451,6 @@ gnc_customer_terms_changed_cb (GtkWidget *widget, gpointer data)
{
GtkComboBox *cbox = GTK_COMBO_BOX (widget);
CustomerWindow *cw = data;
gchar *title;
if (!cw) return;
if (!cbox) return;
@@ -464,7 +463,6 @@ gnc_customer_taxincluded_changed_cb (GtkWidget *widget, gpointer data)
{
GtkComboBox *cbox = GTK_COMBO_BOX (widget);
CustomerWindow *cw = data;
gchar *title;
if (!cw) return;
if (!cbox) return;
@@ -477,7 +475,6 @@ gnc_customer_taxtable_changed_cb (GtkWidget *widget, gpointer data)
{
GtkComboBox *cbox = GTK_COMBO_BOX (widget);
CustomerWindow *cw = data;
gchar *title;
if (!cw) return;
if (!cbox) return;
@@ -1072,7 +1069,6 @@ gnc_customer_addr_common_insert_cb(GtkEditable *editable,
CustomerWindow *wdata = user_data;
gchar *concatenated_text;
QuickFill *match;
const gchar *match_str;
gint prefix_len, concatenated_text_len;
if (new_text_length <= 0)

View File

@@ -233,7 +233,6 @@ iw_ask_unpost (InvoiceWindow *iw)
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 @@ gnc_invoice_owner_changed_cb (GtkWidget *widget, gpointer data)
/* 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 @@ gnc_invoice_terms_changed_cb (GtkWidget *widget, gpointer data)
{
GtkComboBox *cbox = GTK_COMBO_BOX (widget);
InvoiceWindow *iw = data;
gchar *title;
if (!iw) return;
if (!cbox) return;
@@ -2531,7 +2526,6 @@ InvoiceWindow * gnc_ui_invoice_duplicate (GncInvoice *old_invoice, gboolean open
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_one(gpointer data, gpointer user_data)
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))
{

View File

@@ -507,8 +507,6 @@ gnc_order_update_window (OrderWindow *ow)
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 @@ gnc_order_update_window (OrderWindow *ow)
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);

View File

@@ -175,7 +175,6 @@ static gnc_numeric
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 @@ gnc_payment_dialog_calculate_selected_total (PaymentWindow *pw)
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 @@ gnc_payment_window_fill_docs_list (PaymentWindow *pw)
{
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_payment_window_fill_docs_list (PaymentWindow *pw)
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 @@ gnc_payment_window_fill_docs_list (PaymentWindow *pw)
/* 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 @@ static void
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 @@ gnc_payment_ok_cb (GtkWidget *widget, gpointer data)
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;

View File

@@ -320,7 +320,6 @@ gnc_vendor_terms_changed_cb (GtkWidget *widget, gpointer data)
{
GtkComboBox *cbox = GTK_COMBO_BOX (widget);
VendorWindow *vw = data;
gchar *title;
if (!vw) return;
if (!cbox) return;
@@ -333,7 +332,6 @@ gnc_vendor_taxincluded_changed_cb (GtkWidget *widget, gpointer data)
{
GtkComboBox *cbox = GTK_COMBO_BOX (widget);
VendorWindow *vw = data;
gchar *title;
if (!vw) return;
if (!cbox) return;
@@ -346,7 +344,6 @@ gnc_vendor_taxtable_changed_cb (GtkWidget *widget, gpointer data)
{
GtkComboBox *cbox = GTK_COMBO_BOX (widget);
VendorWindow *vw = data;
gchar *title;
if (!vw) return;
if (!cbox) return;

View File

@@ -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 @@ gnc_plugin_business_init (GncPluginBusiness *plugin)
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 @@ static void
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 @@ static void
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());
}

View File

@@ -370,13 +370,10 @@ gnc_plugin_page_invoice_class_init (GncPluginPageInvoiceClass *klass)
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 @@ gnc_plugin_page_invoice_init (GncPluginPageInvoice *plugin_page)
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(" ");
}

View File

@@ -122,7 +122,9 @@ static void gnc_plugin_page_owner_tree_selection_changed_cb (GtkTreeSelection *s
/* 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 @@ static GtkActionEntry gnc_plugin_page_owner_tree_actions [] =
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 @@ static void
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 @@ gnc_plugin_page_owner_tree_button_press_cb (GtkWidget *widget,
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 @@ gnc_plugin_page_owner_tree_selection_changed_cb (GtkTreeSelection *selection,
GncPluginPageOwnerTree *page)
{
GtkActionGroup *action_group;
GtkAction *action;
GtkTreeView *view;
GncOwner *owner = NULL;
gboolean sensitive;
@@ -885,10 +884,8 @@ gnc_plugin_page_owner_tree_selection_changed_cb (GtkTreeSelection *selection,
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 @@ build_aging_report (GncOwnerType owner_type)
static int build_owner_report (GncOwner *owner, Account *acc)
{
int id;
SCM args;
SCM func;
SCM arg;
@@ -1041,12 +1037,12 @@ gnc_plugin_page_owner_tree_cmd_edit_owner (GtkAction *action, GncPluginPageOwner
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 @@ gnc_plugin_page_owner_tree_cmd_delete_owner (GtkAction *action, GncPluginPageOwn
}
g_free(owner_name);
}
#endif /* Disabled due to crash */
/*********************/

View File

@@ -127,14 +127,8 @@ gnc_search_owner_init (GNCSearchOwner *o)
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);
}

View File

@@ -234,9 +234,7 @@ static void gnc_entry_ledger_move_cursor (VirtualLocation *p_new_virt_loc,
* 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 @@ gnc_entry_ledger_auto_completion (GncEntryLedger *ledger,
const char *desc;
BasicCell *cell = NULL;
char *account_name = NULL;
char *new_value = NULL;
g_assert(ledger);
g_assert(ledger->table);

View File

@@ -327,7 +327,6 @@ void gnc_entry_ledger_load (GncEntryLedger *ledger, GList *entry_list)
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 @@ void gnc_entry_ledger_load (GncEntryLedger *ledger, GList *entry_list)
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");

View File

@@ -119,7 +119,6 @@ check_path_return_if_valid(gchar *path)
gchar *
gnc_resolve_file_path (const gchar * filefrag)
{
int namelen;
gchar *fullpath = NULL, *tmp_path = NULL;
/* seriously invalid */
@@ -136,10 +135,6 @@ gnc_resolve_file_path (const gchar * filefrag)
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);

View File

@@ -87,7 +87,7 @@ void gnc_uri_get_components (const gchar *uri,
gchar **password,
gchar **path)
{
gchar **splituri, **spliturl;
gchar **splituri;
gchar *url = NULL, *tmpusername = NULL, *tmphostname = NULL;
gchar *delimiter = NULL;

View File

@@ -1799,7 +1799,7 @@ xaccPostSplitMove (Split *split, Account *accto)
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 @@ xaccAccountMoveAllSplits (Account *accfrom, Account *accto)
/* optimizations */
from_priv = GET_PRIVATE(accfrom);
to_priv = GET_PRIVATE(accto);
if (!from_priv->splits || accfrom == accto)
return;
@@ -1882,7 +1881,6 @@ xaccAccountRecomputeBalance (Account * acc)
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 @@ xaccAccountRecomputeBalance (Account * acc)
split->cleared_balance = cleared_balance;
split->reconciled_balance = reconciled_balance;
last_split = split;
}
priv->balance = balance;

View File

@@ -1008,10 +1008,9 @@ commodity_compare( gconstpointer a, gconstpointer b)
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;

View File

@@ -198,7 +198,8 @@ enum
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);

View File

@@ -172,7 +172,7 @@ void xaccDisableDataScrubbing(void);
#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);
/*@}*/

View File

@@ -208,7 +208,7 @@ gnc_hook_add_scm_dangler (const gchar *name, SCM proc)
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 @@ hook_remove_scm_runner (GHook *hook, gpointer data)
res = scm_equal_p(scm1->proc, scm2->proc);
return(scm_is_true(res));
}
#endif
static void
call_c_hook (GHook *hook, gpointer data)
{

View File

@@ -1580,7 +1580,7 @@ gnc_pricedb_lookup_day(GNCPriceDB *db,
return result;
}
#if 0 /* Not Used */
static void
lookup_day(gpointer key, gpointer val, gpointer user_data)
{
@@ -1603,7 +1603,7 @@ lookup_day(gpointer key, gpointer val, gpointer user_data)
item = item->next;
}
}
#endif
PriceList *
gnc_pricedb_lookup_at_time(GNCPriceDB *db,
@@ -1663,7 +1663,7 @@ gnc_pricedb_lookup_at_time(GNCPriceDB *db,
LEAVE (" ");
return result;
}
#if 0 /* Not Used */
static void
lookup_time(gpointer key, gpointer val, gpointer user_data)
{
@@ -1686,7 +1686,7 @@ lookup_time(gpointer key, gpointer val, gpointer user_data)
item = item->next;
}
}
#endif
GNCPrice *
gnc_pricedb_lookup_nearest_in_time(GNCPriceDB *db,
const gnc_commodity *c,
@@ -2538,9 +2538,7 @@ gnc_pricedb_print_contents(GNCPriceDB *db, FILE *f)
static void
pricedb_book_begin (QofBook *book)
{
GNCPriceDB *db;
db = gnc_pricedb_create(book);
gnc_pricedb_create(book);
}
static void

View File

@@ -92,17 +92,14 @@ static void * search(QofBook * book, const gchar *id, void * object, QofIdType t
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);
}

View File

@@ -954,7 +954,6 @@ gboolean gncInvoiceGetActive (const GncInvoice *invoice)
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 @@ gncInvoiceApplyPayment (const GncInvoice *invoice, Transaction *txn,
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;

View File

@@ -475,14 +475,6 @@ static const char * _gncJobPrintable (gpointer item)
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,

View File

@@ -195,7 +195,7 @@ xaccGetFIFOPolicy (void)
* 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 @@ LIFOPolicyGetLot (GNCPolicy *pcy, Split *split)
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 @@ LIFOPolicyGetLotOpening (GNCPolicy *pcy,
}
/* This routine is actually identical to FIFO... */
static gboolean
G_GNUC_UNUSED static gboolean
LIFOPolicyIsOpeningSplit (GNCPolicy *pcy, GNCLot *lot, Split *split)
{
Split *opening_split;

View File

@@ -916,7 +916,7 @@ add_random_splits(QofBook *book, Transaction *trn, GList *account_list)
{
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 @@ add_random_splits(QofBook *book, Transaction *trn, GList *account_list)
}
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 @@ add_random_transactions_to_book (QofBook *book, gint num_transactions)
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);
}

View File

@@ -40,7 +40,7 @@ run_test (void)
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 @@ run_test (void)
int
main (int argc, char **argv)
{
gint i;
qof_init();
if (!cashobjects_register())
exit(1);

View File

@@ -55,7 +55,7 @@ run_test (void)
int i;
QofSession *sess;
QofBook *book;
QofInstance *ent, *eblk[NENT];
QofInstance *ent;
QofCollection *col;
QofIdType type;
GncGUID guid;
@@ -70,7 +70,6 @@ run_test (void)
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)),

View File

@@ -53,7 +53,7 @@ run_test (void)
{
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 @@ run_test (void)
{
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 @@ run_test (void)
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);

View File

@@ -61,8 +61,6 @@ test_gint_fcn (QofBook *book, const char *message,
static void
test_vendor (void)
{
QofBackend *be;
QofSession *session;
QofBook *book;
GncVendor *vendor;

View File

@@ -366,7 +366,7 @@ setup (Fixture *fixture, gconstpointer pData)
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 @@ test_xaccMallocAccount (void)
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 @@ test_xaccFreeAccount (Fixture *fixture, gconstpointer pData)
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 @@ test_gnc_account_insert_remove_split (Fixture *fixture, gconstpointer pData)
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 @@ test_gnc_account_lookup_by_full_name (Fixture *fixture, gconstpointer pData)
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 @@ static void
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.";

View File

@@ -41,9 +41,7 @@ typedef struct
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);

View File

@@ -393,6 +393,7 @@ test_xaccSplitEqualCheckBal (Fixture *fixture, gconstpointer pData)
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 @@ test_xaccSplitEqual (Fixture *fixture, gconstpointer pData)
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 @@ test_xaccSplitEqual (Fixture *fixture, gconstpointer pData)
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_xaccSplitConvertAmount (void)
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 @@ test_xaccSplitGetCorrAccountFullName (Fixture *fixture, gconstpointer pData)
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 @@ test_xaccSplitCompareAccountFullNames (Fixture *fixture, gconstpointer pData)
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_xaccSplitSetParent (Fixture *fixture, gconstpointer pData)
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 @@ static void
test_xaccSplitMakeStockSplit (Fixture *fixture, gconstpointer pData)
{
Split *split = fixture->split;
Transaction *txn = split->parent;
g_assert_cmpstr (xaccSplitGetType (split), ==, "normal");
xaccSplitMakeStockSplit (split);

View File

@@ -1277,7 +1277,6 @@ do_nothing (gpointer *a, gpointer b)
void
gnc_search_dialog_test (void)
{
GNCSearchWindow *sw;
static GList *params = NULL;
static GList *display = NULL;
static GNCSearchCallbackButton buttons[] =
@@ -1297,9 +1296,10 @@ gnc_search_dialog_test (void)
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);
}

View File

@@ -231,7 +231,6 @@ assistant_gconf_update_prep (GtkAssistant *assistant, gpointer user_data)
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 @@ assistant_gconf_install_cb (GtkToggleButton *button, gpointer user_data)
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 @@ void
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 @@ void
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:

View File

@@ -231,8 +231,6 @@ static guint n_system_encodings = G_N_ELEMENTS (system_encodings);
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 @@ gnc_xml_convert_single_file (const gchar *filename)
{
GncXmlImportData *data;
GtkWidget *widget;
GtkVBox *vb;
GtkBuilder *builder;
gboolean success;
@@ -1050,7 +1047,7 @@ gxi_parse_file (GncXmlImportData *data)
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 @@ gxi_edit_encodings_clicked_cb (GtkButton *button, GncXmlImportData *data)
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 @@ gxi_edit_encodings_clicked_cb (GtkButton *button, GncXmlImportData *data)
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);

View File

@@ -96,7 +96,6 @@ find_or_create_txn(struct CloseAccountsCB* cacb, gnc_commodity* cmdty)
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();

View File

@@ -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
{

View File

@@ -244,8 +244,6 @@ gnc_ui_file_access( int type )
{
FileAccessWindow *faw;
GtkBuilder* builder;
GtkWidget* box;
GList* ds_node;
GtkButton* op;
GtkWidget* file_chooser;
GtkFileChooserWidget* fileChooser;

View File

@@ -40,15 +40,12 @@ gnc_ui_object_references_show( const gchar* explanation_text, GList* objlist )
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 @@ gnc_ui_object_references_show( const gchar* explanation_text, GList* objlist )
/* 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 );

View File

@@ -2918,10 +2918,9 @@ gnc_option_get_ui_value_budget(GNCOption *option, GtkWidget *widget)
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);

View File

@@ -1693,7 +1693,6 @@ gnc_xfer_dialog_fetch (GtkButton *button, XferDialog *xferData)
static void
gnc_xfer_dialog_create(GtkWidget *parent, XferDialog *xferData)
{
GtkWidget *dialog;
GtkBuilder *builder;
gboolean use_accounting_labels;

View File

@@ -361,9 +361,6 @@ gnc_account_sel_get_account( GNCAccountSel *gas )
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 )
{

View File

@@ -77,11 +77,10 @@ autosave_remove_timer_cb(QofBook *book, gpointer key, gpointer user_data);
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

View File

@@ -575,14 +575,10 @@ gnc_date_edit_init (GNCDateEdit *gde)
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);
}

View File

@@ -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 @@ gnc_date_format_init (GNCDateFormat *gdf)
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);
}

View File

@@ -671,12 +671,9 @@ gnc_dense_cal_dispose (GObject *object)
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 @@ _gdc_compute_min_size(GncDenseCal *dcal, guint *min_width, guint *min_height)
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)

View File

@@ -250,16 +250,10 @@ gnc_embedded_window_init (GncEmbeddedWindow *window,
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(" ");

View File

@@ -1055,14 +1055,9 @@ gnc_file_open_file (const char * newfile, gboolean open_readonly)
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(" ");

View File

@@ -149,14 +149,9 @@ gnc_general_select_init (GNCGeneralSelect *gsl)
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);
}

View File

@@ -242,7 +242,6 @@ gnc_gtk_add_rc_file (void)
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 @@ gnc_gnome_init (int argc, char **argv, const char * version)
NULL
};
GList *icons = NULL;
char *fullname, *name_iter;
char *fullname;
for (idx = 0; icon_filenames[idx] != NULL; idx++)
{
@@ -704,7 +703,9 @@ gnc_gui_init(void)
{
static GncMainWindow *main_window;
gchar *map;
#ifdef MAC_INTEGRATION
gchar *data_dir;
#endif
ENTER ("");

View File

@@ -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,

Some files were not shown because too many files have changed in this diff Show More