]> git.ipfire.org Git - thirdparty/plymouth.git/commitdiff
[hashtable] Add some intptr_t casts
authorRay Strode <rstrode@redhat.com>
Wed, 5 Aug 2009 22:28:06 +0000 (18:28 -0400)
committerRay Strode <rstrode@redhat.com>
Wed, 5 Aug 2009 22:28:06 +0000 (18:28 -0400)
This is to fix some compiler warnings.

src/libply/ply-hashtable.c

index 1ed6ae5993db584d27b2405315ffcf4d5e148453..6add5ad4ffbcbddb5eae757196ad296911efcf30 100644 (file)
@@ -53,14 +53,14 @@ struct _ply_hashtable
 unsigned int
 ply_hashtable_direct_hash (void *element)
 {
-  return (unsigned int) element;
+  return (unsigned int) (intptr_t) element;
 }
 
 int
 ply_hashtable_direct_compare (void *elementa,
                               void *elementb)
 {
-  return (unsigned int) elementa - (unsigned int) elementb;
+  return (int) ((intptr_t) elementa - (intptr_t) elementb);
 }
 
 unsigned int