Re: [PATCH] Replace libdw nested functions with macros, part 1.

2015-09-15 Thread Chih-hung Hsieh
Does the new walk_children look right to you? That style is similar to what I would use when I need to factor out code in large C functions. It should be general enough to replace all nested functions in elfutils. On Tue, Sep 15, 2015 at 3:46 PM, Roland McGrath wrote: > A lot of these are long

Re: [PATCH] Replace libdw nested functions with macros, part 1.

2015-09-15 Thread Roland McGrath
A lot of these are longer than I'd like to see for macros. Let's commit all the ones where it's pretty straightforward to make them static functions and then see what's left.

[PATCH] Replace libdwelf nested functions with macros.

2015-09-15 Thread Chih-Hung Hsieh
To be compiled without gnu99 extension. Signed-off-by: Chih-Hung Hsieh --- libdwelf/ChangeLog| 5 + libdwelf/dwelf_elf_gnu_build_id.c | 42 +-- 2 files changed, 28 insertions(+), 19 deletions(-) diff --git a/libdwelf/ChangeLog b/libdwelf/

[PATCH] Move recursive nested function to file scope.

2015-09-15 Thread Chih-Hung Hsieh
Prepare to compile with clang. Signed-off-by: Chih-Hung Hsieh --- src/ChangeLog | 5 src/ld.c | 94 ++- 2 files changed, 53 insertions(+), 46 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 238c416..981aaeb 100644

[PATCH] Replace libdwfl nested functions with macros, part 1.

2015-09-15 Thread Chih-Hung Hsieh
Prepare to compile with clang. Signed-off-by: Chih-Hung Hsieh --- libdwfl/ChangeLog | 13 ++ libdwfl/argp-std.c| 35 +--- libdwfl/core-file.c | 76 ++ libdwfl/dwfl_module.c | 25 ++-

[PATCH] libdw: Don't reassign result pointer in dwarf_peel_type.

2015-09-15 Thread Mark Wielaard
GCC6 will warn about the reassignement of the nonnull result pointer. The reassignment is indeed a little questionable. The compiler cannot see that the pointer will not actually be reassigned since the function will just return the same pointer value except when the dwarf_formref_die function fail