[PATCH 5/5] testsuites/libtests/malloctest: fix warning
Sebastian Huber
sebastian.huber at embedded-brains.de
Thu Jun 9 06:03:50 UTC 2022
On 08/06/2022 15:34, Matthew Joyce wrote:
> @@ -118,13 +116,6 @@ static void test_realloc(void)
> malloc_walk_ok = malloc_walk( 1234, false );
> rtems_test_assert( malloc_walk_ok );
> _Thread_Dispatch_enable( _Per_CPU_Get() );
> -
> - /*
> - * Realloc with a bad pointer to force a point
> - */
> - p4 = realloc( test_realloc, 32 );
> -
> - p4 = _realloc_r( NULL, NULL, 1 );
> }
>
> #define TEST_HEAP_SIZE 2048
> @@ -1526,8 +1517,6 @@ static void test_early_malloc( void )
> rtems_test_assert( p != q );
> rtems_test_assert( q[0] == 0 );
>
> - free( q );
> -
> r = realloc( q, 128 );
> rtems_test_assert( r == q );
Some tests do things you should normally not do. So, sometimes a warning
is hard to avoid. We should definitely not remove valid tests cases to
fix warnings.
--
embedded brains GmbH
Herr Sebastian HUBER
Dornierstr. 4
82178 Puchheim
Germany
email: sebastian.huber at embedded-brains.de
phone: +49-89-18 94 741 - 16
fax: +49-89-18 94 741 - 08
Registergericht: Amtsgericht München
Registernummer: HRB 157899
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
Unsere Datenschutzerklärung finden Sie hier:
https://embedded-brains.de/datenschutzerklaerung/
More information about the devel
mailing list