Skip to content

Commit

Permalink
Merge pull request #128 from algernon/h/value-pairs/warning-fixes
Browse files Browse the repository at this point in the history
value-pairs: Silence a few compiler warnings
  • Loading branch information
algernon committed May 22, 2014
2 parents 4581c3d + 83265ad commit a7df8c7
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions lib/value-pairs.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (c) 2011-2013 BalaBit IT Ltd, Budapest, Hungary
* Copyright (c) 2011-2013 Gergely Nagy <algernon@balabit.hu>
* Copyright (c) 2011-2014 BalaBit IT Ltd, Budapest, Hungary
* Copyright (c) 2011-2014 Gergely Nagy <algernon@balabit.hu>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
Expand Down Expand Up @@ -222,7 +222,7 @@ vp_msg_nvpairs_foreach(NVHandle handle, gchar *name,
{
ValuePairs *vp = ((gpointer *)user_data)[0];
GTree *scope_set = ((gpointer *)user_data)[5];
gint j;
guint j;
gboolean inc;
SBTHGString *sb;

Expand Down Expand Up @@ -254,7 +254,7 @@ vp_msg_nvpairs_foreach(NVHandle handle, gchar *name,
static gboolean
vp_find_in_set(ValuePairs *vp, gchar *name, gboolean exclude)
{
gint j;
guint j;
gboolean included = exclude;

for (j = 0; j < vp->patterns_size; j++)
Expand Down Expand Up @@ -598,10 +598,8 @@ vp_walker_name_value_split_add_name_token(GPtrArray *array, const gchar *name,
static GPtrArray *
vp_walker_name_value_split(const gchar *name)
{
int i;
int current_name_start_idx = 0;
int i, current_name_start_idx = 0, name_len = strlen(name);
GPtrArray *array = g_ptr_array_new();
size_t name_len = strlen(name);

for (i = 0; i < name_len; i++)
{
Expand Down Expand Up @@ -674,7 +672,7 @@ vp_walker_name_split(vp_stack_t *stack, vp_walk_state_t *state,
NULL), so treat that normally. */
key = g_strdup(g_ptr_array_index(tokens, tokens->len - 1));

g_ptr_array_foreach(tokens, g_free, NULL);
g_ptr_array_foreach(tokens, (GFunc)g_free, NULL);
g_ptr_array_free(tokens, TRUE);

return key;
Expand Down Expand Up @@ -821,7 +819,7 @@ value_pairs_new(void)
void
value_pairs_free (ValuePairs *vp)
{
gint i;
guint i;
GList *l;

for (i = 0; i < vp->vpairs->len; i++)
Expand Down

0 comments on commit a7df8c7

Please sign in to comment.