summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
d6f2327)
svn path=/trunk/; revision=7814
2009-01-18 Matthias Clasen <mclasen@redhat.com>
2009-01-18 Matthias Clasen <mclasen@redhat.com>
+ * glib/gbsearcharray.h: Quell some compiler warnings.
+
+2009-01-18 Matthias Clasen <mclasen@redhat.com>
+
* glib/pcre: Update to PCRE 7.8
2009-01-17 Matthias Clasen <mclasen@redhat.com>
* glib/pcre: Update to PCRE 7.8
2009-01-17 Matthias Clasen <mclasen@redhat.com>
gconstpointer node_in_array);
static inline GBSearchArray* g_bsearch_array_remove (GBSearchArray *barray,
const GBSearchConfig *bconfig,
gconstpointer node_in_array);
static inline GBSearchArray* g_bsearch_array_remove (GBSearchArray *barray,
const GBSearchConfig *bconfig,
/* provide uninitialized space at index for node insertion */
static inline GBSearchArray* g_bsearch_array_grow (GBSearchArray *barray,
const GBSearchConfig *bconfig,
/* provide uninitialized space at index for node insertion */
static inline GBSearchArray* g_bsearch_array_grow (GBSearchArray *barray,
const GBSearchConfig *bconfig,
static inline GBSearchArray*
g_bsearch_array_grow (GBSearchArray *barray,
const GBSearchConfig *bconfig,
static inline GBSearchArray*
g_bsearch_array_grow (GBSearchArray *barray,
const GBSearchConfig *bconfig,
{
guint old_size = barray->n_nodes * bconfig->sizeof_node;
guint new_size = old_size + bconfig->sizeof_node;
guint8 *node;
{
guint old_size = barray->n_nodes * bconfig->sizeof_node;
guint new_size = old_size + bconfig->sizeof_node;
guint8 *node;
- g_return_val_if_fail (index <= barray->n_nodes, NULL);
+ g_return_val_if_fail (index_ <= barray->n_nodes, NULL);
if (G_UNLIKELY (bconfig->flags & G_BSEARCH_ARRAY_ALIGN_POWER2))
{
if (G_UNLIKELY (bconfig->flags & G_BSEARCH_ARRAY_ALIGN_POWER2))
{
}
else
barray = (GBSearchArray *) g_realloc (barray, sizeof (GBSearchArray) + new_size);
}
else
barray = (GBSearchArray *) g_realloc (barray, sizeof (GBSearchArray) + new_size);
- node = G_BSEARCH_ARRAY_NODES (barray) + index * bconfig->sizeof_node;
- g_memmove (node + bconfig->sizeof_node, node, (barray->n_nodes - index) * bconfig->sizeof_node);
+ node = G_BSEARCH_ARRAY_NODES (barray) + index_ * bconfig->sizeof_node;
+ g_memmove (node + bconfig->sizeof_node, node, (barray->n_nodes - index_) * bconfig->sizeof_node);
barray->n_nodes += 1;
return barray;
}
barray->n_nodes += 1;
return barray;
}
node = (guint8 *) g_bsearch_array_lookup_insertion (barray, bconfig, key_node);
if (G_LIKELY (node))
{
node = (guint8 *) g_bsearch_array_lookup_insertion (barray, bconfig, key_node);
if (G_LIKELY (node))
{
- guint index = g_bsearch_array_get_index (barray, bconfig, node);
+ guint index_ = g_bsearch_array_get_index (barray, bconfig, node);
- barray = g_bsearch_array_grow (barray, bconfig, index);
- node = G_BSEARCH_ARRAY_NODES (barray) + index * bconfig->sizeof_node;
+ barray = g_bsearch_array_grow (barray, bconfig, index_);
+ node = G_BSEARCH_ARRAY_NODES (barray) + index_ * bconfig->sizeof_node;
}
else /* no insertion needed, node already there */
return barray;
}
else /* no insertion needed, node already there */
return barray;
static inline GBSearchArray*
g_bsearch_array_remove (GBSearchArray *barray,
const GBSearchConfig *bconfig,
static inline GBSearchArray*
g_bsearch_array_remove (GBSearchArray *barray,
const GBSearchConfig *bconfig,
- g_return_val_if_fail (index < barray->n_nodes, NULL);
+ g_return_val_if_fail (index_ < barray->n_nodes, NULL);
- node = G_BSEARCH_ARRAY_NODES (barray) + index * bconfig->sizeof_node;
- g_memmove (node, node + bconfig->sizeof_node, (barray->n_nodes - index) * bconfig->sizeof_node);
+ node = G_BSEARCH_ARRAY_NODES (barray) + index_ * bconfig->sizeof_node;
+ g_memmove (node, node + bconfig->sizeof_node, (barray->n_nodes - index_) * bconfig->sizeof_node);
if (G_UNLIKELY (bconfig->flags & G_BSEARCH_ARRAY_AUTO_SHRINK))
{
guint new_size = barray->n_nodes * bconfig->sizeof_node;
if (G_UNLIKELY (bconfig->flags & G_BSEARCH_ARRAY_AUTO_SHRINK))
{
guint new_size = barray->n_nodes * bconfig->sizeof_node;