[gtk/ci-gtk3-update: 19/20] Silence compiler warnings in release builds
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/ci-gtk3-update: 19/20] Silence compiler warnings in release builds
- Date: Fri, 13 Mar 2020 16:07:42 +0000 (UTC)
commit db1be156992bb281da6335743f16a1d742e63996
Author: Emmanuele Bassi <ebassi gnome org>
Date: Fri Mar 13 16:03:08 2020 +0000
Silence compiler warnings in release builds
Declare debug-only variables inside a G_ENABLE_DEBUG conditional block.
.../cloudprint/gtkcloudprintaccount.c | 39 +++++++++++++++-------
1 file changed, 27 insertions(+), 12 deletions(-)
---
diff --git a/modules/printbackends/cloudprint/gtkcloudprintaccount.c
b/modules/printbackends/cloudprint/gtkcloudprintaccount.c
index ee65a18287..6ff5841408 100644
--- a/modules/printbackends/cloudprint/gtkcloudprintaccount.c
+++ b/modules/printbackends/cloudprint/gtkcloudprintaccount.c
@@ -220,15 +220,20 @@ gtk_cloudprint_account_search_rest_call_cb (RestProxyCall *call,
gpointer user_data)
{
GTask *task = user_data;
- GtkCloudprintAccount *account = g_task_get_task_data (task);
JsonParser *json_parser = NULL;
JsonObject *result;
JsonNode *printers = NULL;
GError *error = NULL;
- GTK_NOTE (PRINTING,
- g_print ("Cloud Print Backend: (%p) 'search' REST call "
- "returned\n", account));
+#ifdef G_ENABLE_DEBUG
+ {
+ GtkCloudprintAccount *account = g_task_get_task_data (task);
+
+ GTK_NOTE (PRINTING,
+ g_print ("Cloud Print Backend: (%p) 'search' REST call returned\n",
+ account));
+ }
+#endif
if (cb_error != NULL)
{
@@ -445,14 +450,19 @@ gtk_cloudprint_account_printer_rest_call_cb (RestProxyCall *call,
gpointer user_data)
{
GTask *task = user_data;
- GtkCloudprintAccount *account = g_task_get_task_data (task);
JsonParser *json_parser = NULL;
JsonObject *result;
GError *error = NULL;
- GTK_NOTE (PRINTING,
- g_print ("Cloud Print Backend: (%p) 'printer' REST call "
- "returned\n", account));
+#ifdef G_ENABLE_DEBUG
+ {
+ GtkCloudprintAccount *account = g_task_get_task_data (task);
+
+ GTK_NOTE (PRINTING,
+ g_print ("Cloud Print Backend: (%p) 'printer' REST call returned\n",
+ account));
+ }
+#endif
if (cb_error != NULL)
{
@@ -536,14 +546,19 @@ gtk_cloudprint_account_submit_rest_call_cb (RestProxyCall *call,
gpointer user_data)
{
GTask *task = user_data;
- GtkCloudprintAccount *account = g_task_get_task_data (task);
JsonParser *json_parser = NULL;
JsonObject *result;
GError *error = NULL;
- GTK_NOTE (PRINTING,
- g_print ("Cloud Print Backend: (%p) 'submit' REST call "
- "returned\n", account));
+#ifdef G_ENABLE_DEBUG
+ {
+ GtkCloudprintAccount *account = g_task_get_task_data (task);
+
+ GTK_NOTE (PRINTING,
+ g_print ("Cloud Print Backend: (%p) 'submit' REST call returned\n",
+ account));
+ }
+#endif
if (cb_error != NULL)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]