From d3be549561ae1a35dba8f2b0eb400f06980a390c Mon Sep 17 00:00:00 2001 From: Francis Deslauriers Date: Tue, 28 Aug 2018 17:09:48 -0400 Subject: [PATCH] Fix: unused value in SDT probe description parsing MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Reported-by: Coverity (1395199) Unused value Signed-off-by: Francis Deslauriers Signed-off-by: Jérémie Galarneau --- src/common/lttng-elf.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/common/lttng-elf.c b/src/common/lttng-elf.c index 47dc89900..5d3aaad04 100644 --- a/src/common/lttng-elf.c +++ b/src/common/lttng-elf.c @@ -875,7 +875,7 @@ int lttng_elf_get_sdt_probe_offsets(int fd, const char *provider_name, struct lttng_elf *elf = NULL; char *stap_note_section_data = NULL; char *curr_note_section_begin, *curr_data_ptr, *curr_probe, *curr_provider; - char *next_note_ptr, *curr_desc_beg; + char *next_note_ptr; uint32_t name_size, desc_size, note_type; uint64_t curr_probe_location, curr_probe_offset, curr_semaphore_location; uint64_t *probe_locs = NULL, *new_probe_locs = NULL; @@ -965,9 +965,6 @@ int lttng_elf_get_sdt_probe_offsets(int fd, const char *provider_name, curr_data_ptr += name_size; - /* Get description field. */ - curr_desc_beg = curr_data_ptr; - /* Get probe location. */ curr_probe_location = *(uint64_t *) curr_data_ptr; curr_data_ptr += sizeof(uint64_t); @@ -984,9 +981,6 @@ int lttng_elf_get_sdt_probe_offsets(int fd, const char *provider_name, /* Get probe name. */ curr_probe = curr_data_ptr; - curr_data_ptr += strlen(curr_probe) + 1; - - curr_data_ptr = curr_desc_beg + desc_size; /* Check if the provider and probe name match */ if (strcmp(provider_name, curr_provider) == 0 && -- 2.34.1