File pan-fix-warnings.patch of Package pan
commit de6eac9509ad6ce3924a4e9289a95222dc8a78c1
Author: Vincent Untz <vuntz@gnome.org>
Date: Tue Apr 10 10:46:40 2012 +0200
Fix several build warnings about missing return value
https://bugzilla.gnome.org/show_bug.cgi?id=673820
diff --git a/pan/gui/e-cte-dialog.c b/pan/gui/e-cte-dialog.c
index 81d826a..e039d3a 100644
--- a/pan/gui/e-cte-dialog.c
+++ b/pan/gui/e-cte-dialog.c
@@ -127,12 +127,12 @@ e_cte_dialog (const char *title, const char *prompt, GMimeContentEncoding now, G
GtkTreeIter iter;
GMimeContentEncoding value;
- if (!gtk_combo_box_get_active_iter (GTK_COMBO_BOX(picker), &iter))
- return;
-
- model = gtk_combo_box_get_model (GTK_COMBO_BOX(picker));
- gtk_tree_model_get (model, &iter, 1, &value, -1);
- ret = value;
+ if (gtk_combo_box_get_active_iter (GTK_COMBO_BOX(picker), &iter))
+ {
+ model = gtk_combo_box_get_model (GTK_COMBO_BOX(picker));
+ gtk_tree_model_get (model, &iter, 1, &value, -1);
+ ret = value;
+ }
}
gtk_widget_destroy (GTK_WIDGET (dialog));
diff --git a/pan/gui/pan.cc b/pan/gui/pan.cc
index a7df3c4..6acaa78 100644
--- a/pan/gui/pan.cc
+++ b/pan/gui/pan.cc
@@ -213,6 +213,7 @@ namespace
static gboolean status_icon_periodic_refresh (gpointer p)
{
static_cast<StatusIconListener*>(p)->update_status_tooltip();
+ return true;
}
#ifdef HAVE_LIBNOTIFY
diff --git a/pan/usenet-utils/mime-utils.cc b/pan/usenet-utils/mime-utils.cc
index 9980f9e..ca27980 100644
--- a/pan/usenet-utils/mime-utils.cc
+++ b/pan/usenet-utils/mime-utils.cc
@@ -1724,7 +1724,7 @@ namespace pan
return body;
}
- GMimeMessage*
+ bool
gpg_encrypt (const std::string& uid, const std::string& body_str,
GMimeMessage* body, GPtrArray* rcp, bool sign)
{
@@ -1740,13 +1740,14 @@ namespace pan
{
g_object_unref(mpe);
g_object_unref(G_OBJECT(part));
- return 0;
+ return false;
}
g_mime_message_set_mime_part(body,GMIME_OBJECT(mpe));
g_object_unref(G_OBJECT(part));
g_object_unref(mpe);
+ return true;
}
#endif
}
diff --git a/pan/usenet-utils/mime-utils.h b/pan/usenet-utils/mime-utils.h
index 021ee2b..a00c9af 100644
--- a/pan/usenet-utils/mime-utils.h
+++ b/pan/usenet-utils/mime-utils.h
@@ -69,7 +69,7 @@ namespace pan
#ifdef HAVE_GMIME_CRYPTO
GMimeMessage* message_add_signed_part (const std::string& uid, const std::string& body_str, GMimeMessage* body);
- GMimeMessage* gpg_encrypt (const std::string& uid, const std::string& body_str, GMimeMessage* body, GPtrArray* rcp, bool sign);
+ bool gpg_encrypt (const std::string& uid, const std::string& body_str, GMimeMessage* body, GPtrArray* rcp, bool sign);
bool gpg_verify_mps (GMimeObject*, GPGDecErr&);
#endif
/**