summaryrefslogtreecommitdiff
path: root/testsuites/libtests
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@oarcorp.com>2015-03-22 14:59:52 -0500
committerJoel Sherrill <joel.sherrill@oarcorp.com>2015-03-24 08:16:29 -0500
commit59efbdd4e9402c685a7374dfe7e01457b7846b84 (patch)
tree80bd323e7d160f6c10f37246fd11c142103d4e08 /testsuites/libtests
parent0a9345ed684bc74b27731fb2aeda2ebab13773c9 (diff)
malloctest/init.c: Fix use uninitialized warning
Diffstat (limited to 'testsuites/libtests')
-rw-r--r--testsuites/libtests/malloctest/init.c3
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 ) {