r18390 - gnucash/trunk/src/register - Make one register function more const correct to avoid compiler warnings when passing const strings.
Christian Stimming
cstim at code.gnucash.org
Sun Oct 25 16:34:14 EDT 2009
Author: cstim
Date: 2009-10-25 16:34:14 -0400 (Sun, 25 Oct 2009)
New Revision: 18390
Trac: http://svn.gnucash.org/trac/changeset/18390
Modified:
gnucash/trunk/src/register/register-core/combocell.h
gnucash/trunk/src/register/register-gnome/combocell-gnome.c
gnucash/trunk/src/register/register-gnome/gnucash-item-list.c
gnucash/trunk/src/register/register-gnome/gnucash-item-list.h
Log:
Make one register function more const correct to avoid compiler warnings when passing const strings.
Modified: gnucash/trunk/src/register/register-core/combocell.h
===================================================================
--- gnucash/trunk/src/register/register-core/combocell.h 2009-10-25 20:06:49 UTC (rev 18389)
+++ gnucash/trunk/src/register/register-core/combocell.h 2009-10-25 20:34:14 UTC (rev 18390)
@@ -58,7 +58,7 @@
void gnc_combo_cell_clear_menu (ComboCell *cell);
/** Add a menu item to the list. */
-void gnc_combo_cell_add_menu_item (ComboCell *cell, char * menustr);
+void gnc_combo_cell_add_menu_item (ComboCell *cell, const char * menustr);
/** Add a 'account name' menu item to the list. When testing for
* equality with the currently selected item, this function will
Modified: gnucash/trunk/src/register/register-gnome/combocell-gnome.c
===================================================================
--- gnucash/trunk/src/register/register-gnome/combocell-gnome.c 2009-10-25 20:06:49 UTC (rev 18389)
+++ gnucash/trunk/src/register/register-gnome/combocell-gnome.c 2009-10-25 20:34:14 UTC (rev 18390)
@@ -411,7 +411,7 @@
}
void
-gnc_combo_cell_add_menu_item (ComboCell *cell, char * menustr)
+gnc_combo_cell_add_menu_item (ComboCell *cell, const char * menustr)
{
PopBox *box;
Modified: gnucash/trunk/src/register/register-gnome/gnucash-item-list.c
===================================================================
--- gnucash/trunk/src/register/register-gnome/gnucash-item-list.c 2009-10-25 20:06:49 UTC (rev 18389)
+++ gnucash/trunk/src/register/register-gnome/gnucash-item-list.c 2009-10-25 20:34:14 UTC (rev 18390)
@@ -82,7 +82,7 @@
void
-gnc_item_list_append (GncItemList *item_list, char *string)
+gnc_item_list_append (GncItemList *item_list, const char *string)
{
GtkTreeIter iter;
Modified: gnucash/trunk/src/register/register-gnome/gnucash-item-list.h
===================================================================
--- gnucash/trunk/src/register/register-gnome/gnucash-item-list.h 2009-10-25 20:06:49 UTC (rev 18389)
+++ gnucash/trunk/src/register/register-gnome/gnucash-item-list.h 2009-10-25 20:34:14 UTC (rev 18390)
@@ -65,7 +65,7 @@
void gnc_item_list_clear (GncItemList *item_list);
-void gnc_item_list_append (GncItemList *item_list, char *string);
+void gnc_item_list_append (GncItemList *item_list, const char *string);
void gnc_item_list_set_sort_enabled(GncItemList *item_list, gboolean enabled);
More information about the gnucash-changes
mailing list