Commit 59232af1 authored by Emmanuel Milou's avatar Emmanuel Milou
Browse files

Fix GVAlue initialization warnings

parent e825ec5a
......@@ -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
......
......@@ -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;
......
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment