diff options
author | Joel Sherrill <joel.sherrill@oarcorp.com> | 2015-03-22 14:59:52 -0500 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@oarcorp.com> | 2015-03-24 08:16:29 -0500 |
commit | 59efbdd4e9402c685a7374dfe7e01457b7846b84 (patch) | |
tree | 80bd323e7d160f6c10f37246fd11c142103d4e08 /testsuites/libtests | |
parent | shell/utils-cp.c: Avoid redefinition of TIMESPEC_TO_TIMEVAL (diff) | |
download | rtems-59efbdd4e9402c685a7374dfe7e01457b7846b84.tar.bz2 |
malloctest/init.c: Fix use uninitialized warning
Diffstat (limited to 'testsuites/libtests')
-rw-r--r-- | testsuites/libtests/malloctest/init.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/testsuites/libtests/malloctest/init.c b/testsuites/libtests/malloctest/init.c index 399cdd5dc9..7e1728dbde 100644 --- a/testsuites/libtests/malloctest/init.c +++ b/testsuites/libtests/malloctest/init.c @@ -1199,6 +1199,9 @@ static void test_posix_memalign(void) maximumShift = (sizeof(size_t) * CHAR_BIT) - 1; for ( i=sizeof(void *) ; i<maximumShift ; i++ ) { size_t alignment = 1 << i; + + p1 = NULL; /* Initialize p1 to aovid used uninitialized */ + printf( "posix_memalign - alignment of %zd -- OK\n", alignment); sc = posix_memalign( &p1, alignment, 8 ); if ( sc == ENOMEM ) { |