From 59232af1c961b9c182658a95ff7374d96fad97ab Mon Sep 17 00:00:00 2001
From: Emmanuel Milou <emmanuel.milou@savoirfairelinux.com>
Date: Fri, 6 Feb 2009 12:07:10 -0500
Subject: [PATCH] Fix GVAlue initialization warnings

---
 sflphone-gtk/configure.ac        | 2 +-
 sflphone-gtk/src/configwindow.c  | 3 ++-
 sflphone-gtk/src/historyfilter.c | 7 ++++++-
 3 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/sflphone-gtk/configure.ac b/sflphone-gtk/configure.ac
index 6fce5b4c1b..4aed9cef8d 100644
--- a/sflphone-gtk/configure.ac
+++ b/sflphone-gtk/configure.ac
@@ -15,7 +15,7 @@ AC_ARG_WITH(debug,
 		[with_debug=no]
 	)
 if test "x$with_debug" = "xfull" -o "x$with_debug" = "xyes"; then
-	CFLAGS="$CFLAGS -g -DDEBUG -Wall -Wextra"
+	CFLAGS="$CFLAGS -g -O2 -DDEBUG -Wall -Wextra"
 else
 	CFLAGS="$CFLAGS -g -Wall -O2"
 fi
diff --git a/sflphone-gtk/src/configwindow.c b/sflphone-gtk/src/configwindow.c
index a15290e3bf..7e079995bf 100644
--- a/sflphone-gtk/src/configwindow.c
+++ b/sflphone-gtk/src/configwindow.c
@@ -184,8 +184,9 @@ clean_history( void )
 select_account(GtkTreeSelection *selection, GtkTreeModel *model)
 {
     GtkTreeIter iter;
-    GValue val = {0};
+    GValue val;
 
+    memset (&val, 0, sizeof(val));
     if (!gtk_tree_selection_get_selected(selection, &model, &iter))
     {
         selectedAccount = NULL;
diff --git a/sflphone-gtk/src/historyfilter.c b/sflphone-gtk/src/historyfilter.c
index b7d5ebc21b..db1d405246 100644
--- a/sflphone-gtk/src/historyfilter.c
+++ b/sflphone-gtk/src/historyfilter.c
@@ -17,6 +17,8 @@
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
+#include <string.h>
+
 #include <historyfilter.h>
 #include <calltree.h>
 
@@ -35,9 +37,11 @@ is_visible(GtkTreeModel* model, GtkTreeIter* iter, gpointer data UNUSED)
 {
   if( SHOW_SEARCHBAR )
   {
-	GValue val = {0,};
+	GValue val;
+
 	gchar* text = NULL;
 	gchar* search = (gchar*)gtk_entry_get_text(GTK_ENTRY(filter_entry));
+    memset (&val, 0, sizeof(val));
 	gtk_tree_model_get_value(GTK_TREE_MODEL(model), iter, 1, &val);
 	if(G_VALUE_HOLDS_STRING(&val)){
 		text = (gchar *)g_value_get_string(&val);
@@ -45,6 +49,7 @@ is_visible(GtkTreeModel* model, GtkTreeIter* iter, gpointer data UNUSED)
 	if(text != NULL && g_ascii_strncasecmp(search, _("Search"), 6) != 0){
 		return g_regex_match_simple(search, text, G_REGEX_CASELESS, 0);
  	}
+    g_value_unset (&val);
 	return TRUE;
   }
   return TRUE;
-- 
GitLab