summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2021-07-26 11:22:16 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2021-07-28 08:54:47 +0200
commitf4d681ce1ad23503fc2f9e0d64c9edb7004156ec (patch)
treecf91cd8880cdd0008ab488634cfe3fb855cbf9f2
parentaf352903faa115810fd1f7f67b723f49cf87992f (diff)
Fix _IO_Dump_gcov_info()
-rw-r--r--cpukit/score/src/iodumpgcovinfo.c13
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;
}
}