From 6a2e8c78b06ed69935fcb1b423f761d3fedafadc Mon Sep 17 00:00:00 2001 From: "Pavel I. Kryukov" Date: Fri, 20 Jul 2018 15:42:53 +0300 Subject: [PATCH] Avoid hiding local variable by another local variable in elfio::load_sections --- elfio/elfio.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/elfio/elfio.hpp b/elfio/elfio.hpp index 1325cf3..a4052bd 100644 --- a/elfio/elfio.hpp +++ b/elfio/elfio.hpp @@ -408,8 +408,8 @@ class elfio if ( SHN_UNDEF != shstrndx ) { string_section_accessor str_reader( sections[shstrndx] ); for ( Elf_Half i = 0; i < num; ++i ) { - Elf_Word offset = sections[i]->get_name_string_offset(); - const char* p = str_reader.get_string( offset ); + Elf_Word section_offset = sections[i]->get_name_string_offset(); + const char* p = str_reader.get_string( section_offset ); if ( p != 0 ) { sections[i]->set_name( p ); }