[vlc-devel] commit: test/dictionary: Be nicer on LP64, and avoid a warning. (Pierre d' Herbemont )

git version control git at videolan.org
Wed Aug 26 00:34:16 CEST 2009


vlc | branch: master | Pierre d'Herbemont <pdherbemont at free.fr> | Wed Aug 26 00:26:00 2009 +0200| [74673f8f3386d01683d1bd827ba8fcb73ff2e068] | committer: Pierre d'Herbemont 

test/dictionary: Be nicer on LP64, and avoid a warning.

LLP64, well, later.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=74673f8f3386d01683d1bd827ba8fcb73ff2e068
---

 src/test/dictionary.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/test/dictionary.c b/src/test/dictionary.c
index 7c82374..cfe632d 100644
--- a/src/test/dictionary.c
+++ b/src/test/dictionary.c
@@ -1,3 +1,4 @@
+
 /*****************************************************************************
  * dictionary.c: Tests for vlc_dictionary_t
  *****************************************************************************
@@ -36,7 +37,7 @@ static void test_dictionary_validity (vlc_dictionary_t * p_dict, const char ** o
 {
     /* Test values and keys now */
     char ** keys = vlc_dictionary_all_keys( p_dict );
-    int i, j;
+    long i, j;
 
     assert( keys );
 
@@ -57,7 +58,7 @@ static void test_dictionary_validity (vlc_dictionary_t * p_dict, const char ** o
     free( keys );
 
     for( i = 0; i < size; i++ )
-        assert( vlc_dictionary_value_for_key( p_dict, our_keys[i] ) == (void*)i );
+        assert( vlc_dictionary_value_for_key( p_dict, our_keys[i] ) == (void *)i );
 }
 
 int main (void)
@@ -67,7 +68,7 @@ int main (void)
     };
     const int size = sizeof(our_keys)/sizeof(our_keys[0]);
     char ** keys;
-    int i = 0;
+    long i = 0;
 
     vlc_dictionary_t dict;
     vlc_dictionary_init( &dict, 0 );
@@ -81,7 +82,7 @@ int main (void)
 
     /* Insert some values */
     for( i = 0; i < size; i++ )
-        vlc_dictionary_insert( &dict, our_keys[i], (void*)i );
+        vlc_dictionary_insert( &dict, our_keys[i], (void *)i );
 
     test_dictionary_validity( &dict, our_keys, size );
 




More information about the vlc-devel mailing list