From cd7f7b29e77de27588527350ab5bbb4f2000a69f Mon Sep 17 00:00:00 2001 From: Tobias Stoeckmann Date: Sat, 6 Sep 2025 22:56:05 +0200 Subject: [PATCH] ghash: Turn mod into guint The only signed arithmetic left is the version. Keep it at that for now but turn mod into unsigned for all other unsigned operations. --- glib/ghash.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/glib/ghash.c b/glib/ghash.c index 016239bcc..df90bc608 100644 --- a/glib/ghash.c +++ b/glib/ghash.c @@ -211,7 +211,7 @@ struct _GHashTable { guint size; - gint mod; + guint mod; guint mask; guint nnodes; guint noccupied; /* nnodes + tombstones */ @@ -256,8 +256,7 @@ G_STATIC_ASSERT (G_ALIGNOF (GHashTableIter) >= G_ALIGNOF (RealIter)); * then works modulo 2^n. The prime modulo is necessary to get a * good distribution with poor hash functions. */ -static const gint prime_mod [] = -{ +static const guint prime_mod[] = { 1, /* For 1 << 0 */ 2, 3,