diff options
-rw-r--r-- | cpukit/score/src/iodumpgcovinfo.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/cpukit/score/src/iodumpgcovinfo.c b/cpukit/score/src/iodumpgcovinfo.c index 561281e472..144c041edb 100644 --- a/cpukit/score/src/iodumpgcovinfo.c +++ b/cpukit/score/src/iodumpgcovinfo.c @@ -42,7 +42,7 @@ #include <rtems/linkersets.h> #include <gcov.h> -#include <unistd.h> +#include <stdlib.h> RTEMS_LINKER_ROSET( gcov_info, const struct gcov_info * ); @@ -90,24 +90,19 @@ static void *_IO_Gcov_allocate( unsigned length, void *arg ) void _IO_Dump_gcov_info( IO_Put_char put_char, void *arg ) { IO_Dump_gcov_context ctx; - const struct gcov_info * const *info; - const struct gcov_info * const *end; + const struct gcov_info * const *item; ctx.put_char = put_char; ctx.arg = arg; - info = RTEMS_LINKER_SET_BEGIN( gcov_info ); - end = RTEMS_LINKER_SET_END( gcov_info ); - RTEMS_OBFUSCATE_VARIABLE( end ); - while ( info != end ) { + RTEMS_LINKER_SET_FOREACH( gcov_info, item ) { __gcov_info_to_gcda( - *info, + *item, _IO_Gcov_filename, _IO_Gcov_dump, _IO_Gcov_allocate, &ctx ); ( *put_char )( '\n', arg ); - ++info; } } |