diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2021-07-26 11:22:16 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2021-07-26 11:22:16 +0200 |
commit | 25a98d33c60fa2247b932c03a8f0b7a876d8e34d (patch) | |
tree | 8814785a5df60f9570f7be0883303b8d0c4a21db | |
parent | f9a9e772ddf7b38465d4cc8200397a548a1528d1 (diff) |
Fix _IO_Dump_gcov_info()
-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; } } |