summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarco Trevisan (Treviño) <mail@3v1n0.net>2022-10-06 03:52:17 +0200
committerMarco Trevisan (Treviño) <mail@3v1n0.net>2022-10-06 04:09:09 +0200
commit0c297cee6158fbf2a9c517c4198f58b1e1d58b9f (patch)
tree3f9c2fc5a9a3c5004369ea397c84fdf36bef7e43
parent10b94dd76c19c6052c699179c81554c50eaeb16e (diff)
downloadgobject-introspection-0c297cee6158fbf2a9c517c4198f58b1e1d58b9f.tar.gz
cmph: Do not set debug variables if debug is not set
Fixes clang builds
-rw-r--r--girepository/cmph/chd_ph.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/girepository/cmph/chd_ph.c b/girepository/cmph/chd_ph.c
index 8356bded..ae986b42 100644
--- a/girepository/cmph/chd_ph.c
+++ b/girepository/cmph/chd_ph.c
@@ -579,7 +579,7 @@ static inline cmph_uint8 chd_ph_check_bin_hashing(chd_ph_config_data_t *chd_ph,
{
register cmph_uint32 bucket_size, i, j;
register cmph_uint32 position, probe0_num, probe1_num;
- register cmph_uint32 m = 0;
+ G_GNUC_UNUSED register cmph_uint32 m = 0;
register chd_ph_item_t * item;
if(chd_ph->keys_per_bin > 1)
memset(chd_ph->occup_table, 0, chd_ph->n);
@@ -596,7 +596,9 @@ static inline cmph_uint8 chd_ph_check_bin_hashing(chd_ph_config_data_t *chd_ph,
probe1_num = disp_table[buckets[i].bucket_id] / chd_ph->n;
for(; j > 0; j--)
{
+#ifdef DEBUG
m++;
+#endif
position = (cmph_uint32)((item->f + ((cmph_uint64 )item->h) * probe0_num + probe1_num) % chd_ph->n);
if(chd_ph->keys_per_bin > 1)
{