Fix some printf's of NULL in DEBUG, ENTER and LEAVE macro invocations.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15188 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Andreas Köhler
2006-12-06 20:03:30 +00:00
parent e453f3d4c1
commit 47f406a9b7
6 changed files with 33 additions and 12 deletions
+1 -1
View File
@@ -1052,7 +1052,7 @@ qof_session_begin (QofSession *session, const char * book_id,
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)
+1 -1
View File
@@ -174,7 +174,7 @@ gnc_file_dialog (const char * title,
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;
}
+14 -5
View File
@@ -180,8 +180,11 @@ gnc_html_parse_url(gnc_html * html, const gchar * url,
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 @@ gnc_html_load_to_stream(gnc_html * html, GtkHTMLStream * handle,
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 @@ gnc_html_show_url(gnc_html * html, URLType type,
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 *
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 @@ gnc_html_new( GtkWindow *parent )
retval);
gtk_html_load_empty(GTK_HTML(retval->html));
LEAVE("retval %p", retval);
return retval;
}
+4
View File
@@ -2007,6 +2007,8 @@ gnc_main_window_open_page (GncMainWindow *window,
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 @@ gnc_main_window_open_page (GncMainWindow *window,
* Now install it all in the window.
*/
gnc_main_window_connect(window, page, tab_hbox, label);
LEAVE("");
}
+2 -2
View File
@@ -803,7 +803,7 @@ gnc_tree_view_column_visible (GncTreeView *view,
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 @@ gnc_tree_view_build_column_menu (GncTreeView *view)
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
@@ -319,6 +319,8 @@ gnc_plugin_page_report_create_widget( GncPluginPage *page )
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 @@ gnc_plugin_page_report_create_widget( GncPluginPage *page )
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 @@ gnc_plugin_page_report_create_widget( GncPluginPage *page )
gtk_widget_show_all( GTK_WIDGET(priv->container) );
LEAVE("container %p", priv->container);
return GTK_WIDGET( priv->container );
}
@@ -431,7 +437,8 @@ gnc_plugin_page_report_load_cb(gnc_html * html, URLType type,
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 @@ gnc_plugin_page_report_name_changed (GncPluginPage *page, const gchar *name)
/* 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;