aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenoit Germain <bnt.germain@gmail.com>2013-11-18 11:31:02 +0100
committerBenoit Germain <bnt.germain@gmail.com>2013-11-18 11:31:02 +0100
commitbc2320a30965b2877b1e47790f0b432955d211f9 (patch)
tree1ee6da30cb1c13062d531f2cea112411fb65ae9a
parenta13d0d4de4c5724933afcf5c350302efa9204f89 (diff)
downloadlanes-bc2320a30965b2877b1e47790f0b432955d211f9.tar.gz
lanes-bc2320a30965b2877b1e47790f0b432955d211f9.tar.bz2
lanes-bc2320a30965b2877b1e47790f0b432955d211f9.zip
Fix compilation warning introduced by aef73939a513e67989a9ad2256f14754ebdaa28e.
-rw-r--r--src/keeper.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/keeper.c b/src/keeper.c
index 72ccedb..8686bc8 100644
--- a/src/keeper.c
+++ b/src/keeper.c
@@ -624,9 +624,10 @@ struct s_Keeper* keeper_acquire( void const* ptr)
624 * consistently. 624 * consistently.
625 * 625 *
626 * Pointers are often aligned by 8 or so - ignore the low order bits 626 * Pointers are often aligned by 8 or so - ignore the low order bits
627 * have to cast to unsigned long to avoid compilation warnings about loss of data when converting pointer-to-integer
627 */ 628 */
628 unsigned int i = ((unsigned int)(ptr) >> 3) % GNbKeepers; 629 unsigned int i = (unsigned int)(((unsigned long)(ptr) >> 3) % GNbKeepers);
629 struct s_Keeper *K= &GKeepers[i]; 630 struct s_Keeper* K = &GKeepers[i];
630 631
631 MUTEX_LOCK( &K->lock_); 632 MUTEX_LOCK( &K->lock_);
632 //++ K->count; 633 //++ K->count;