From cabeeee10b5e41adeb300cc5084aad33a4df4bf9 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 22 Jan 2009 13:17:45 -0800 Subject: [PATCH] Tiny build nits. --- src/ChangeLog | 5 +++++ src/Makefile.am | 3 ++- src/readelf.c | 6 +----- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index fcf440be6..0f9da7543 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,10 @@ 2009-01-22 Roland McGrath + * readelf.c (print_debug_frame_section): Initialize IS_SIGNED to false + and reset it only for the 'true' cases. + + * Makefile.am (addr2line_no_Wformat): New variable. + * readelf.c (print_debug_frame_section): Use t instead of j formats for ptrdiff_t OFFSET. diff --git a/src/Makefile.am b/src/Makefile.am index f72bb4589..091642fe0 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,6 +1,6 @@ ## Process this file with automake to create Makefile.in ## -## Copyright (C) 1996-2002, 2003, 2004, 2005, 2006, 2007 Red Hat, Inc. +## Copyright (C) 1996-2002, 2003, 2004, 2005, 2006, 2007, 2009 Red Hat, Inc. ## This file is part of Red Hat elfutils. ## ## Red Hat elfutils is free software; you can redistribute it and/or modify @@ -108,6 +108,7 @@ libeu = ../lib/libeu.a nm_no_Wformat = yes size_no_Wformat = yes strings_no_Wformat = yes +addr2line_no_Wformat = yes # XXX While the file is not finished, don't warn about this ldgeneric_no_Wunused = yes diff --git a/src/readelf.c b/src/readelf.c index b42c393a7..fc2abfc3d 100644 --- a/src/readelf.c +++ b/src/readelf.c @@ -4701,13 +4701,12 @@ print_debug_frame_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr, unsigned int encoding = *readp++; uint64_t val = 0; int64_t sval = 0; - bool is_signed; + bool is_signed = false; switch (encoding & 0xf) { case DW_EH_PE_uleb128: get_uleb128 (val, readp); - is_signed = false; break; case DW_EH_PE_sleb128: get_sleb128 (sval, readp); @@ -4715,15 +4714,12 @@ print_debug_frame_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr, break; case DW_EH_PE_udata2: val = read_2ubyte_unaligned_inc (dbg, readp); - is_signed = false; break; case DW_EH_PE_udata4: val = read_4ubyte_unaligned_inc (dbg, readp); - is_signed = false; break; case DW_EH_PE_udata8: val = read_8ubyte_unaligned_inc (dbg, readp); - is_signed = false; break; case DW_EH_PE_sdata2: val = read_2sbyte_unaligned_inc (dbg, readp); -- 2.47.2