r15188 - gnucash/trunk - Fix some printf's of NULL in DEBUG, ENTER and LEAVE macro invocations.
Andreas Köhler
andi5 at cvs.gnucash.org
Wed Dec 6 15:03:32 EST 2006
Author: andi5
Date: 2006-12-06 15:03:30 -0500 (Wed, 06 Dec 2006)
New Revision: 15188
Trac: http://svn.gnucash.org/trac/changeset/15188
Modified:
gnucash/trunk/lib/libqof/qof/qofsession.c
gnucash/trunk/src/gnome-utils/gnc-file.c
gnucash/trunk/src/gnome-utils/gnc-html.c
gnucash/trunk/src/gnome-utils/gnc-main-window.c
gnucash/trunk/src/gnome-utils/gnc-tree-view.c
gnucash/trunk/src/report/report-gnome/gnc-plugin-page-report.c
Log:
Fix some printf's of NULL in DEBUG, ENTER and LEAVE macro invocations.
Modified: gnucash/trunk/lib/libqof/qof/qofsession.c
===================================================================
--- gnucash/trunk/lib/libqof/qof/qofsession.c 2006-12-06 03:36:58 UTC (rev 15187)
+++ gnucash/trunk/lib/libqof/qof/qofsession.c 2006-12-06 20:03:30 UTC (rev 15188)
@@ -1052,7 +1052,7 @@
g_free(session->book_id);
session->book_id = NULL;
qof_session_push_error (session, err, msg);
- LEAVE(" backend error %d %s", err, msg);
+ LEAVE(" backend error %d %s", err, msg ? msg : "(null)");
return;
}
if (msg != NULL)
Modified: gnucash/trunk/src/gnome-utils/gnc-file.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-file.c 2006-12-06 03:36:58 UTC (rev 15187)
+++ gnucash/trunk/src/gnome-utils/gnc-file.c 2006-12-06 20:03:30 UTC (rev 15188)
@@ -174,7 +174,7 @@
file_name = g_strdup(internal_name);
}
gtk_widget_destroy(GTK_WIDGET(file_box));
- LEAVE("%s", file_name);
+ LEAVE("%s", file_name ? file_name : "(null)");
return file_name;
}
Modified: gnucash/trunk/src/gnome-utils/gnc-html.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-html.c 2006-12-06 03:36:58 UTC (rev 15187)
+++ gnucash/trunk/src/gnome-utils/gnc-html.c 2006-12-06 20:03:30 UTC (rev 15188)
@@ -180,8 +180,11 @@
int found_protocol=0, found_path=0, found_label=0;
URLType retval;
- DEBUG("parsing %s, base_location %s", url,
- html ? html->base_location : "<null hmtl>");
+ DEBUG("parsing %s, base_location %s",
+ url ? url : "(null)",
+ html ? (html->base_location ? html->base_location
+ : "(null base_location)")
+ : "(null html)");
regcomp(&compiled, uri_rexp, REG_EXTENDED);
if(!regexec(&compiled, url, 6, match, 0)) {
@@ -558,7 +561,8 @@
char * fdata = NULL;
int fdata_len = 0;
- DEBUG("type %s, location %s, label %s", type, location, label);
+ DEBUG("type %s, location %s, label %s", type ? type : "(null)",
+ location ? location : "(null)", label ? label : "(null)");
if(!html) {
return;
}
@@ -1027,8 +1031,9 @@
html->base_type = result.base_type;
html->base_location =
g_strdup (extract_base_name(result.base_type, new_location));
- DEBUG("resetting base location to %s", html->base_location);
-
+ DEBUG("resetting base location to %s",
+ html->base_location ? html->base_location : "(null)");
+
stream = gtk_html_begin (GTK_HTML(html->html));
gnc_html_load_to_stream (html, stream, result.url_type,
new_location, new_label);
@@ -1128,6 +1133,8 @@
gnc_html_new( GtkWindow *parent )
{
gnc_html * retval = g_new0(gnc_html, 1);
+
+ ENTER("parent %p", parent);
retval->window = GTK_WIDGET(parent);
retval->container = gtk_scrolled_window_new(NULL, NULL);
@@ -1177,6 +1184,8 @@
retval);
gtk_html_load_empty(GTK_HTML(retval->html));
+
+ LEAVE("retval %p", retval);
return retval;
}
Modified: gnucash/trunk/src/gnome-utils/gnc-main-window.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-main-window.c 2006-12-06 03:36:58 UTC (rev 15187)
+++ gnucash/trunk/src/gnome-utils/gnc-main-window.c 2006-12-06 20:03:30 UTC (rev 15188)
@@ -2007,6 +2007,8 @@
GtkWidget *image;
GList *tmp;
+ ENTER("window %p, page %p", window, page);
+
if (window)
g_return_if_fail (GNC_IS_MAIN_WINDOW (window));
g_return_if_fail (GNC_IS_PLUGIN_PAGE (page));
@@ -2108,6 +2110,8 @@
* Now install it all in the window.
*/
gnc_main_window_connect(window, page, tab_hbox, label);
+
+ LEAVE("");
}
Modified: gnucash/trunk/src/gnome-utils/gnc-tree-view.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-tree-view.c 2006-12-06 03:36:58 UTC (rev 15187)
+++ gnucash/trunk/src/gnome-utils/gnc-tree-view.c 2006-12-06 20:03:30 UTC (rev 15188)
@@ -803,7 +803,7 @@
return TRUE;
}
pref_name = (gchar *)g_object_get_data(G_OBJECT(column), PREF_NAME);
- DEBUG("pref_name is %s", pref_name);
+ DEBUG("pref_name is %s", pref_name ? pref_name : "(null)");
}
if (!pref_name) {
@@ -1433,7 +1433,7 @@
gtk_tree_view_column_set_visible(priv->column_menu_column, FALSE);
}
LEAVE("menu: show %d, section %s", priv->show_column_menu,
- priv->gconf_section);
+ priv->gconf_section ? priv->gconf_section : "(null)");
}
/** This function is called to synchronize the checkbox on a menu item
Modified: gnucash/trunk/src/report/report-gnome/gnc-plugin-page-report.c
===================================================================
--- gnucash/trunk/src/report/report-gnome/gnc-plugin-page-report.c 2006-12-06 03:36:58 UTC (rev 15187)
+++ gnucash/trunk/src/report/report-gnome/gnc-plugin-page-report.c 2006-12-06 20:03:30 UTC (rev 15188)
@@ -319,6 +319,8 @@
char * url_location = NULL;
char * url_label = NULL;
+ ENTER("page %p", page);
+
report = GNC_PLUGIN_PAGE_REPORT(page);
priv = GNC_PLUGIN_PAGE_REPORT_GET_PRIVATE(report);
@@ -347,7 +349,9 @@
child_name = gnc_build_url( URL_TYPE_REPORT, id_name, NULL );
type = gnc_html_parse_url( priv->html, child_name, &url_location, &url_label);
DEBUG( "passing id_name=[%s] child_name=[%s] type=[%s], location=[%s], label=[%s]",
- id_name, child_name, type, url_location, url_label );
+ id_name, child_name ? child_name : "(null)",
+ type ? type : "(null)", url_location ? url_location : "(null)",
+ url_label ? url_label : "(null)" );
gnc_window_set_progressbar_window( GNC_WINDOW(page->window) );
gnc_html_show_url(priv->html, type, url_location, url_label, 0);
@@ -358,6 +362,8 @@
gtk_widget_show_all( GTK_WIDGET(priv->container) );
+ LEAVE("container %p", priv->container);
+
return GTK_WIDGET( priv->container );
}
@@ -431,7 +437,8 @@
SCM inst_report;
ENTER( "load_cb: type=[%s], location=[%s], label=[%s]",
- type, location, label );
+ type ? type : "(null)", location ? location : "(null)",
+ label ? label : "(null)" );
/* we get this callback if a new report is requested to be loaded OR
* if any URL is clicked. If an options URL is clicked, we want to
@@ -834,7 +841,8 @@
/* Is this a redundant call? */
old_name = gnc_option_db_lookup_string_option(priv->cur_odb, "General",
"Report name", NULL);
- DEBUG("Comparing old name '%s' to new name '%s'", old_name, name);
+ DEBUG("Comparing old name '%s' to new name '%s'",
+ old_name ? old_name : "(null)", name);
if (old_name && (strcmp(old_name, name) == 0)) {
LEAVE("no change");
return;
More information about the gnucash-changes
mailing list