public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
From: Mark Wielaard <mark@klomp.org>
To: elfutils-devel@sourceware.org
Cc: Mark Wielaard <mark@klomp.org>
Subject: [COMMITTED] libdw: Don't dereference and assign values we are skipping
Date: Thu,  3 Nov 2022 14:18:00 +0100	[thread overview]
Message-ID: <20221103131800.18217-1-mark@klomp.org> (raw)

We don't use the FDE address encoding byte, so no reason
to read and store it. Just skip past it.

Signed-off-by: Mark Wielaard <mark@klomp.org>
---
 libdw/ChangeLog        | 5 +++++
 libdw/dwarf_next_cfi.c | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/libdw/ChangeLog b/libdw/ChangeLog
index 3c595a3d..6cbf192d 100644
--- a/libdw/ChangeLog
+++ b/libdw/ChangeLog
@@ -1,3 +1,8 @@
+2022-11-03  Mark Wielaard  <mark@klomp.org>
+
+	* dwarf_next_cfi.c (dwarf_next_cfi): Don't dereference and assign
+	bytes.
+
 2022-10-21  Yonggang Luo  <luoyonggang@gmail.com>
 
 	* dwarf_begin_elf.h: Don't include unistd.h and endian.h.
diff --git a/libdw/dwarf_next_cfi.c b/libdw/dwarf_next_cfi.c
index 23b16885..be08984f 100644
--- a/libdw/dwarf_next_cfi.c
+++ b/libdw/dwarf_next_cfi.c
@@ -226,7 +226,7 @@ dwarf_next_cfi (const unsigned char e_ident[],
 	      if (sized_augmentation)
 		{
 		  /* Skip FDE address encoding byte.  */
-		  encoding = *bytes++;
+		  bytes++;
 		  continue;
 		}
 	      break;
-- 
2.18.4


                 reply	other threads:[~2022-11-03 13:18 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221103131800.18217-1-mark@klomp.org \
    --to=mark@klomp.org \
    --cc=elfutils-devel@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).