Fix compiler warnings.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@6276 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Dave Peticolas 2001-12-08 03:17:51 +00:00
parent 92f01055e1
commit 3adbf0e631
28 changed files with 28 additions and 79 deletions

View File

@ -343,7 +343,7 @@ Transaction * gncInvoicePostToAccount (GncInvoice *invoice, Account *acc,
Timespec *date)
{
Transaction *txn;
GList *item, *iter;
GList *iter;
GList *splitinfo = NULL;
gnc_numeric total;
gnc_commodity *commonCommodity = NULL;

View File

@ -23,6 +23,7 @@ void gncInvoiceDestroy (GncInvoice *invoice);
/* Set Functions */
void gncInvoiceSetID (GncInvoice *invoice, const char *id);
void gncInvoiceSetOwner (GncInvoice *invoice, GncOwner *owner);
void gncInvoiceSetDateOpened (GncInvoice *invoice, const Timespec *date);
void gncInvoiceSetDateDue (GncInvoice *invoice, const Timespec *date);
void gncInvoiceSetDateClosed (GncInvoice *invoice, const Timespec *date);

View File

@ -244,6 +244,7 @@ static void remObj (GncJob *job)
g_hash_table_remove (ht, &job->guid);
}
#if 0
static GList * _gncJobGetList (GNCBook *obj, gboolean show_all)
{
if (!obj) return NULL;
@ -251,6 +252,7 @@ static GList * _gncJobGetList (GNCBook *obj, gboolean show_all)
/* XXX */
return NULL;
}
#endif
static const char * _gncJobPrintable (gpointer item)
{

View File

@ -78,8 +78,6 @@ GncOrder *gncOrderCreate (GNCBook *book)
void gncOrderDestroy (GncOrder *order)
{
GList *item;
if (!order) return;
g_list_free (order->entries);

View File

@ -27,10 +27,12 @@ test_bool_fcn (GNCBook *book, const char *message,
void (*set) (GncEmployee *, gboolean),
gboolean (*get) (GncEmployee *));
#if 0
static void
test_gint_fcn (GNCBook *book, const char *message,
void (*set) (GncEmployee *, gint),
gint (*get) (GncEmployee *));
#endif
static void
test_employee (void)
@ -148,6 +150,7 @@ test_bool_fcn (GNCBook *book, const char *message,
count++;
}
#if 0
static void
test_gint_fcn (GNCBook *book, const char *message,
void (*set) (GncEmployee *, gint),
@ -163,6 +166,7 @@ test_gint_fcn (GNCBook *book, const char *message,
gncEmployeeSetActive (employee, FALSE);
count++;
}
#endif
static void
main_helper (int argc, char **argv)

View File

@ -17,20 +17,24 @@ test_string_fcn (GNCBook *book, const char *message,
void (*set) (GncJob *, const char *str),
const char * (*get)(GncJob *));
#if 0
static void
test_numeric_fcn (GNCBook *book, const char *message,
void (*set) (GncJob *, gnc_numeric),
gnc_numeric (*get)(GncJob *));
#endif
static void
test_bool_fcn (GNCBook *book, const char *message,
void (*set) (GncJob *, gboolean),
gboolean (*get) (GncJob *));
#if 0
static void
test_gint_fcn (GNCBook *book, const char *message,
void (*set) (GncJob *, gint),
gint (*get) (GncJob *));
#endif
static void
test_job (void)
@ -128,6 +132,7 @@ test_string_fcn (GNCBook *book, const char *message,
gncJobSetActive (job, FALSE); count++;
}
#if 0
static void
test_numeric_fcn (GNCBook *book, const char *message,
void (*set) (GncJob *, gnc_numeric),
@ -142,6 +147,7 @@ test_numeric_fcn (GNCBook *book, const char *message,
do_test (gnc_numeric_equal (get (job), num), message);
gncJobSetActive (job, FALSE); count++;
}
#endif
static void
test_bool_fcn (GNCBook *book, const char *message,
@ -160,6 +166,7 @@ test_bool_fcn (GNCBook *book, const char *message,
gncJobSetActive (job, FALSE); count++;
}
#if 0
static void
test_gint_fcn (GNCBook *book, const char *message,
void (*set) (GncJob *, gint),
@ -174,6 +181,7 @@ test_gint_fcn (GNCBook *book, const char *message,
do_test (get (job) == num, message);
gncJobSetActive (job, FALSE); count++;
}
#endif
static void
main_helper (int argc, char **argv)

View File

@ -17,10 +17,12 @@ test_string_fcn (GNCBook *book, const char *message,
void (*set) (GncVendor *, const char *str),
const char * (*get)(GncVendor *));
#if 0
static void
test_numeric_fcn (GNCBook *book, const char *message,
void (*set) (GncVendor *, gnc_numeric),
gnc_numeric (*get)(GncVendor *));
#endif
static void
test_bool_fcn (GNCBook *book, const char *message,
@ -112,6 +114,7 @@ test_string_fcn (GNCBook *book, const char *message,
gncVendorSetActive (vendor, FALSE); count++;
}
#if 0
static void
test_numeric_fcn (GNCBook *book, const char *message,
void (*set) (GncVendor *, gnc_numeric),
@ -126,6 +129,7 @@ test_numeric_fcn (GNCBook *book, const char *message,
do_test (gnc_numeric_equal (get (vendor), num), message);
gncVendorSetActive (vendor, FALSE); count++;
}
#endif
static void
test_bool_fcn (GNCBook *book, const char *message,

View File

@ -43,7 +43,7 @@ chooser_choice_changed_cb(GtkList *list, GtkWidget *li, gpointer user_data)
static void
update_selection_picker (struct business_chooser_window *w)
{
GList *objs, *iterator;
GList *iterator;
GtkWidget *li;
GList *obj_list;
gpointer selected;

View File

@ -193,8 +193,6 @@ static void
gnc_customer_window_ok_cb (GtkWidget *widget, gpointer data)
{
CustomerWindow *cw = data;
char *res;
GncCustomer *cust;
gnc_numeric min, max;
/* Check for valid id */
@ -259,7 +257,6 @@ gnc_customer_window_cancel_cb (GtkWidget *widget, gpointer data)
static void
gnc_customer_window_help_cb (GtkWidget *widget, gpointer data)
{
CustomerWindow *cw = data;
char *help_file = ""; /* xxx */
helpWindow(NULL, NULL, help_file);
@ -551,7 +548,6 @@ gnc_customer_new_window (GtkWidget *parent, GNCBook *bookp,
gnc_customer_window_close_handler,
cw);
} else {
gnc_numeric num;
cust = gncCustomerCreate (bookp);
cw->customer_guid = *gncCustomerGetGUID (cust);
@ -644,7 +640,6 @@ static gpointer gnc_customer_edit_new_cb (gpointer arg, GtkWidget *toplevel)
static void gnc_customer_edit_edit_cb (gpointer arg, gpointer obj, GtkWidget *toplevel)
{
GncCustomer *cust = obj;
struct _customer_select_window *sw = arg;
if (!arg || !obj) return;
@ -671,9 +666,6 @@ gpointer gnc_customer_edit_new_select (gpointer bookp, gpointer cust,
gpointer gnc_customer_edit_new_edit (gpointer bookp, gpointer cust,
GtkWidget *toplevel)
{
GNCBook *book = bookp;
GncCustomer *customer = cust;
g_return_val_if_fail (cust != NULL, NULL);
gnc_customer_edit (toplevel, cust);

View File

@ -82,7 +82,6 @@ ew_get_employee (EmployeeWindow *ew)
static void gnc_ui_to_employee (EmployeeWindow *ew, GncEmployee *employee)
{
GncAddress *addr;
gnc_numeric num;
addr = gncEmployeeGetAddr (employee);
@ -125,6 +124,7 @@ static void gnc_ui_to_employee (EmployeeWindow *ew, GncEmployee *employee)
gnc_resume_gui_refresh ();
}
#if 0
static gboolean check_edit_amount (GtkWidget *dialog, GtkWidget *amount,
gnc_numeric *min, gnc_numeric *max,
const char * error_message)
@ -146,6 +146,7 @@ static gboolean check_edit_amount (GtkWidget *dialog, GtkWidget *amount,
}
return FALSE;
}
#endif
static gboolean check_entry_nonempty (GtkWidget *dialog, GtkWidget *entry,
const char * error_message)
@ -163,9 +164,6 @@ static void
gnc_employee_window_ok_cb (GtkWidget *widget, gpointer data)
{
EmployeeWindow *ew = data;
char *res;
GncEmployee *employee;
gnc_numeric min, max;
/* Check for valid id */
if (check_entry_nonempty (ew->dialog, ew->id_entry,
@ -216,7 +214,6 @@ gnc_employee_window_cancel_cb (GtkWidget *widget, gpointer data)
static void
gnc_employee_window_help_cb (GtkWidget *widget, gpointer data)
{
EmployeeWindow *ew = data;
char *help_file = ""; /* xxx */
helpWindow(NULL, NULL, help_file);
@ -426,8 +423,6 @@ gnc_employee_new_window (GtkWidget *parent, GNCBook *bookp,
/* Setup initial values */
if (employee != NULL) {
GncAddress *addr;
const char *string;
gint pos = 0;
ew->dialog_type = EDIT_EMPLOYEE;
ew->employee_guid = *gncEmployeeGetGUID (employee);
@ -462,7 +457,6 @@ gnc_employee_new_window (GtkWidget *parent, GNCBook *bookp,
gnc_employee_window_close_handler,
ew);
} else {
gnc_numeric num;
employee = gncEmployeeCreate (bookp);
ew->employee_guid = *gncEmployeeGetGUID (employee);
@ -551,7 +545,6 @@ static gpointer gnc_employee_edit_new_cb (gpointer arg, GtkWidget *toplevel)
static void gnc_employee_edit_edit_cb (gpointer arg, gpointer obj, GtkWidget *toplevel)
{
GncEmployee *employee = obj;
struct _employee_select_window *sw = arg;
if (!arg || !obj) return;
@ -578,7 +571,6 @@ gpointer gnc_employee_edit_new_select (gpointer bookp, gpointer employee,
gpointer gnc_employee_edit_new_edit (gpointer bookp, gpointer v,
GtkWidget *toplevel)
{
GNCBook *book = bookp;
GncEmployee *employee = v;
g_return_val_if_fail (employee != NULL, NULL);

View File

@ -158,7 +158,6 @@ select_job_customer_changed_cb(GtkList *list, GtkWidget *li,
gpointer user_data)
{
struct select_job_window * w = user_data;
GList *node;
if (!li)
return;
@ -172,7 +171,6 @@ static void
select_job_job_changed_cb(GtkList *list, GtkWidget *li, gpointer user_data)
{
struct select_job_window * w = user_data;
GList *node;
if (!li)
return;
@ -262,7 +260,6 @@ gnc_ui_select_job_new (GtkWidget * parent, GNCBook *book,
struct select_job_window * win =
g_new0(struct select_job_window, 1);
GladeXML *xml;
GtkWidget *choice_name_label;
GncJob *retval;
g_return_val_if_fail (book != NULL, NULL);

View File

@ -145,7 +145,6 @@ gnc_job_window_cancel_cb (GtkWidget *widget, gpointer data)
static void
gnc_job_window_help_cb (GtkWidget *widget, gpointer data)
{
JobWindow *jw = data;
char *help_file = ""; /* xxx */
/* XXX */
@ -414,6 +413,7 @@ gnc_job_edit (GtkWidget *parent, GncJob *job)
/* Functions for widgets for job selection */
#if 0
static gpointer gnc_job_edit_new_cb (gpointer arg)
{
struct _job_select_window *sw = arg;
@ -431,6 +431,7 @@ static void gnc_job_edit_edit_cb (gpointer arg, gpointer obj)
gnc_job_edit (sw->toplevel, job);
}
#endif
gpointer gnc_job_edit_new_select (gpointer job, GtkWidget *toplevel,
GncCustomer *cust)

View File

@ -102,7 +102,6 @@ static void
gnc_order_window_ok_cb (GtkWidget *widget, gpointer data)
{
OrderWindow *ow = data;
GncOrder *order;
{
const char *res = gtk_entry_get_text (GTK_ENTRY (ow->id_entry));
@ -138,7 +137,6 @@ gnc_order_window_cancel_cb (GtkWidget *widget, gpointer data)
static void
gnc_order_window_help_cb (GtkWidget *widget, gpointer data)
{
OrderWindow *ow = data;
char *help_file = ""; /* xxx */
helpWindow(NULL, NULL, help_file);
@ -420,7 +418,6 @@ void
gnc_order_edit (GtkWidget *parent, GncOrder *order)
{
OrderWindow *ow;
GncOwner owner;
if (!order) return;
@ -451,7 +448,6 @@ static gpointer gnc_order_edit_new_cb (gpointer arg, GtkWidget *toplevel)
static void gnc_order_edit_edit_cb (gpointer arg, gpointer obj, GtkWidget *toplevel)
{
GncOrder *order = obj;
struct _order_select_window *sw = arg;
if (!arg || !obj) return;
@ -478,7 +474,6 @@ gpointer gnc_order_edit_new_select (gpointer bookp, gpointer order,
gpointer gnc_order_edit_new_edit (gpointer bookp, gpointer v,
GtkWidget *toplevel)
{
GNCBook *book = bookp;
GncOrder *order = v;
g_return_val_if_fail (order != NULL, NULL);

View File

@ -160,9 +160,7 @@ static void
gnc_vendor_window_ok_cb (GtkWidget *widget, gpointer data)
{
VendorWindow *vw = data;
char *res;
GncVendor *vendor;
gnc_numeric min, max;
gnc_numeric min;
/* Check for valid id */
if (check_entry_nonempty (vw->dialog, vw->id_entry,
@ -215,7 +213,6 @@ gnc_vendor_window_cancel_cb (GtkWidget *widget, gpointer data)
static void
gnc_vendor_window_help_cb (GtkWidget *widget, gpointer data)
{
VendorWindow *vw = data;
char *help_file = ""; /* xxx */
helpWindow(NULL, NULL, help_file);
@ -323,7 +320,6 @@ gnc_vendor_new_window (GtkWidget *parent, GNCBook *bookp,
GladeXML *xml;
GtkWidget *hbox, *edit;
GnomeDialog *vwd;
gnc_commodity *commodity;
GNCPrintAmountInfo print_info;
vw = g_new0 (VendorWindow, 1);
@ -452,7 +448,6 @@ gnc_vendor_new_window (GtkWidget *parent, GNCBook *bookp,
gnc_vendor_window_close_handler,
vw);
} else {
gnc_numeric num;
vendor = gncVendorCreate (bookp);
vw->vendor_guid = *gncVendorGetGUID (vendor);
@ -541,7 +536,6 @@ static gpointer gnc_vendor_edit_new_cb (gpointer arg, GtkWidget *toplevel)
static void gnc_vendor_edit_edit_cb (gpointer arg, gpointer obj, GtkWidget *toplevel)
{
GncVendor *vendor = obj;
struct _vendor_select_window *sw = arg;
if (!arg || !obj) return;
@ -568,7 +562,6 @@ gpointer gnc_vendor_edit_new_select (gpointer bookp, gpointer vendor,
gpointer gnc_vendor_edit_new_edit (gpointer bookp, gpointer v,
GtkWidget *toplevel)
{
GNCBook *book = bookp;
GncVendor *vendor = v;
g_return_val_if_fail (vendor != NULL, NULL);

View File

@ -73,8 +73,6 @@ GncEntry * gnc_entry_ledger_get_entry (GncEntryLedger *ledger,
/* Returns the Entry where the cursor is currently located. */
GncEntry * gnc_entry_ledger_get_current_entry (GncEntryLedger *ledger)
{
GUID *guid;
if (!ledger) return NULL;
return
@ -230,7 +228,7 @@ gboolean gnc_entry_ledger_find_entry (GncEntryLedger *ledger, GncEntry *entry,
VirtualCellLocation *vcell_loc)
{
Table *table = ledger->table;
int v_row, v_col;
int v_row;
GncEntry *e;
for (v_row = 1; v_row < table->num_virt_rows; v_row++) {

View File

@ -27,8 +27,6 @@ static void gnc_entry_ledger_move_cursor (VirtualLocation *p_new_virt_loc,
{
GncEntryLedger *ledger = user_data;
VirtualLocation new_virt_loc = *p_new_virt_loc;
VirtualCellLocation old_entry_loc;
GncEntry *pending_entry;
GncEntry *new_entry;
GncEntry *old_entry;
gboolean saved;
@ -95,11 +93,8 @@ gnc_entry_ledger_auto_completion (GncEntryLedger *ledger,
gncTableTraversalDir dir,
VirtualLocation *p_new_virt_loc)
{
VirtualLocation new_virt_loc;
GncEntry *entry;
GncEntry *blank_entry;
const char *cell_name;
BasicCell *cell;
blank_entry = gncEntryLookup (ledger->book, &ledger->blank_entry_guid);

View File

@ -111,7 +111,6 @@ static void gnc_entry_ledger_set_cells (GncEntryLedger *ledger,
TableLayout *layout)
{
CellBlock *curs;
CellBlock *curs_last;
int x = 0;
switch (ledger->type) {

View File

@ -37,7 +37,6 @@ const char * gnc_entry_ledger_type_string_getter (char flag)
static void load_tax_type_cells (GncEntryLedger *ledger)
{
RecnCell *cell;
const char * s;
if (!ledger) return;
@ -54,7 +53,6 @@ static void load_tax_type_cells (GncEntryLedger *ledger)
static void load_discount_type_cells (GncEntryLedger *ledger)
{
RecnCell *cell;
const char * s;
if (!ledger) return;

View File

@ -427,8 +427,6 @@ gnc_ledger_display_template_gl (char *id)
{
GNCBook *book;
Query *q;
time_t start;
struct tm *tm;
GNCLedgerDisplay *ld;
SplitRegister *sr;
AccountGroup *ag;

View File

@ -62,7 +62,6 @@ static void
gnc_split_register_load_type_cells (SplitRegister *reg)
{
RecnCell *cell;
const char * s;
if (!reg) return;

View File

@ -54,7 +54,6 @@ gnc_split_register_save_date_cell (BasicCell * cell,
gpointer user_data)
{
SRSaveData *sd = save_data;
SplitRegister *reg = user_data;
const char *value;
Timespec ts;
@ -93,7 +92,6 @@ gnc_split_register_save_due_date_cell (BasicCell * cell,
gpointer user_data)
{
SRSaveData *sd = save_data;
SplitRegister *reg = user_data;
const char *value;
Timespec ts;
@ -146,7 +144,6 @@ gnc_split_register_save_desc_cell (BasicCell * cell,
gpointer user_data)
{
SRSaveData *sd = save_data;
SplitRegister *reg = user_data;
const char *value;
g_return_if_fail (gnc_basic_cell_has_name (cell, DESC_CELL));
@ -164,7 +161,6 @@ gnc_split_register_save_notes_cell (BasicCell * cell,
gpointer user_data)
{
SRSaveData *sd = save_data;
SplitRegister *reg = user_data;
const char *value;
g_return_if_fail (gnc_basic_cell_has_name (cell, NOTES_CELL));
@ -182,7 +178,6 @@ gnc_split_register_save_recn_cell (BasicCell * bcell,
gpointer user_data)
{
SRSaveData *sd = save_data;
SplitRegister *reg = user_data;
RecnCell *cell = (RecnCell *) bcell;
g_return_if_fail (gnc_basic_cell_has_name (bcell, RECN_CELL));
@ -198,7 +193,6 @@ gnc_split_register_save_actn_cell (BasicCell * cell,
gpointer user_data)
{
SRSaveData *sd = save_data;
SplitRegister *reg = user_data;
const char *value;
g_return_if_fail (gnc_basic_cell_has_name (cell, ACTN_CELL));
@ -216,7 +210,6 @@ gnc_split_register_save_memo_cell (BasicCell * cell,
gpointer user_data)
{
SRSaveData *sd = save_data;
SplitRegister *reg = user_data;
const char *value;
g_return_if_fail (gnc_basic_cell_has_name (cell, MEMO_CELL));
@ -307,7 +300,6 @@ gnc_split_register_save_shares_cell (BasicCell * bcell,
gpointer user_data)
{
SRSaveData *sd = save_data;
SplitRegister *reg = user_data;
PriceCell *cell = (PriceCell *) bcell;
gnc_numeric amount;
@ -328,7 +320,6 @@ gnc_split_register_save_price_cell (BasicCell * bcell,
gpointer user_data)
{
SRSaveData *sd = save_data;
SplitRegister *reg = user_data;
PriceCell *cell = (PriceCell *) bcell;
gnc_numeric price;
@ -382,7 +373,6 @@ gnc_split_register_save_cells (gpointer save_data,
gpointer user_data)
{
SRSaveData *sd = save_data;
SplitRegister *reg = user_data;
Split *other_split;
g_return_if_fail (sd != NULL);
@ -469,9 +459,6 @@ gnc_template_register_save_debcred_cell (BasicCell * cell,
SplitRegister *reg = user_data;
kvp_frame *kvpf;
const char *value;
gnc_numeric new_amount;
gnc_numeric credit;
gnc_numeric debit;
g_return_if_fail (gnc_basic_cell_has_name (cell, FDEBT_CELL) ||
gnc_basic_cell_has_name (cell, FCRED_CELL));
@ -513,7 +500,6 @@ gnc_template_register_save_shares_cell (BasicCell * cell,
gpointer user_data)
{
SRSaveData *sd = save_data;
SplitRegister *reg = user_data;
kvp_frame *kvpf;
char *sharesStr = "(x + y)/42";

View File

@ -1083,7 +1083,6 @@ gnc_split_register_get_xfrm_entry (VirtualLocation virt_loc,
SplitRegister *reg = user_data;
Split *split;
Split *s;
split = gnc_split_register_get_split (reg, virt_loc.vcell_loc);

View File

@ -2305,8 +2305,6 @@ gnc_split_register_cleanup (SplitRegister *reg)
void
gnc_split_register_destroy (SplitRegister *reg)
{
GList *node;
if (!reg)
return;

View File

@ -43,9 +43,6 @@
#include "gnc-engine-util.h"
/* This static indicates the debugging module that this .o belongs to. */
static short module = MOD_REGISTER;
gboolean
gnc_cell_name_equal (const char * cell_name_1,
const char * cell_name_2)

View File

@ -44,8 +44,6 @@
#include "gnc-engine-util.h"
#include "recncell.h"
/* This static indicates the debugging module that this .o belongs to. */
static short module = MOD_REGISTER;
static void gnc_recn_cell_set_value (BasicCell *_cell, const char *value);

View File

@ -73,8 +73,6 @@ typedef struct _PopBox
} PopBox;
static void gnc_combo_cell_block_list_signals (ComboCell *cell);
static void gnc_combo_cell_unblock_list_signals (ComboCell *cell);
static void gnc_combo_cell_gui_realize (BasicCell *bcell, gpointer w);
static void gnc_combo_cell_gui_move (BasicCell *bcell);
static void gnc_combo_cell_gui_destroy (BasicCell *bcell);

View File

@ -442,7 +442,6 @@ gnc_date_cell_direct_update (BasicCell *bcell,
PopBox *box = cell->cell.gui_private;
GdkEventKey *event = gui_data;
char buff[DATE_BUF];
GDate gdate;
if (!gnc_handle_date_accelerator (event, &(box->date), bcell->value))
return FALSE;

View File

@ -40,7 +40,7 @@
#include "gnc-gui-query.h"
#include "gnc-html-history.h"
#include "gnc-html.h"
/* #include "gnc-ui.h" */
#include "gnc-ui.h"
#include "option-util.h"
#include "window-report.h"