Imported Upstream version 2.67.1
[platform/upstream/glib.git] / glib / tests / hash.c
index 16acbbf..f4ff55c 100644 (file)
@@ -183,7 +183,7 @@ static guint
 honeyman_hash (gconstpointer key)
 {
   const gchar *name = (const gchar *) key;
-  gint size;
+  gsize size;
   guint sum = 0;
 
   g_assert (name != NULL);
@@ -591,7 +591,7 @@ test_hash_misc (void)
   gint value = 120;
   gint *pvalue;
   GList *keys, *values;
-  gint keys_len, values_len;
+  gsize keys_len, values_len;
   GHashTableIter iter;
   gpointer ikey, ivalue;
   int result_array[10000];
@@ -1347,7 +1347,7 @@ test_lookup_extended (void)
 
 struct _GHashTable
 {
-  gint             size;
+  gsize            size;
   gint             mod;
   guint            mask;
   gint             nnodes;
@@ -1362,7 +1362,7 @@ struct _GHashTable
 
   GHashFunc        hash_func;
   GEqualFunc       key_equal_func;
-  volatile gint    ref_count;
+  gint             ref_count;  /* (atomic) */
 
 #ifndef G_DISABLE_ASSERT
   int              version;
@@ -1374,7 +1374,7 @@ struct _GHashTable
 static void
 count_keys (GHashTable *h, gint *unused, gint *occupied, gint *tombstones)
 {
-  gint i;
+  gsize i;
 
   *unused = 0;
   *occupied = 0;
@@ -1410,7 +1410,7 @@ fetch_key_or_value (gpointer a, guint index, gboolean is_big)
 static void
 check_data (GHashTable *h)
 {
-  gint i;
+  gsize i;
 
   for (i = 0; i < h->size; i++)
     {