Commit 1341c129 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Don't use random number as pointers.

This is not legal (even if it works on all platforms). Also, this fixes
a warning.
parent d4be4dc2
...@@ -154,13 +154,15 @@ static void test_strings( libvlc_int_t *p_libvlc ) ...@@ -154,13 +154,15 @@ static void test_strings( libvlc_int_t *p_libvlc )
static void test_address( libvlc_int_t *p_libvlc ) static void test_address( libvlc_int_t *p_libvlc )
{ {
char dummy[i_var_count];
int i; int i;
for( i = 0; i < i_var_count; i++ ) for( i = 0; i < i_var_count; i++ )
var_Create( p_libvlc, psz_var_name[i], VLC_VAR_ADDRESS ); var_Create( p_libvlc, psz_var_name[i], VLC_VAR_ADDRESS );
for( i = 0; i < i_var_count; i++ ) for( i = 0; i < i_var_count; i++ )
{ {
var_value[i].p_address = rand(); var_value[i].p_address = dummy + i;
var_SetAddress( p_libvlc, psz_var_name[i], var_value[i].p_address ); var_SetAddress( p_libvlc, psz_var_name[i], var_value[i].p_address );
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment