From 1341c12935d18fd56b886969ecf1565f5b2ace96 Mon Sep 17 00:00:00 2001 From: =?utf8?q?R=C3=A9mi=20Denis-Courmont?= Date: Sun, 14 Feb 2010 11:55:50 +0200 Subject: [PATCH] Don't use random number as pointers. This is not legal (even if it works on all platforms). Also, this fixes a warning. --- test/src/misc/variables.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/src/misc/variables.c b/test/src/misc/variables.c index e2524618da..15e7fc5d0d 100644 --- a/test/src/misc/variables.c +++ b/test/src/misc/variables.c @@ -154,13 +154,15 @@ static void test_strings( libvlc_int_t *p_libvlc ) static void test_address( libvlc_int_t *p_libvlc ) { + char dummy[i_var_count]; + int i; for( i = 0; i < i_var_count; i++ ) var_Create( p_libvlc, psz_var_name[i], VLC_VAR_ADDRESS ); 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 ); } -- 2.39.2