symlite: fix warnings given by gcc 4.8
authorJosh Stone <jistone@redhat.com>
Thu, 30 May 2013 19:36:29 +0000 (12:36 -0700)
committerJosh Stone <jistone@redhat.com>
Thu, 30 May 2013 19:36:29 +0000 (12:36 -0700)
commit3cc37f82227c92424094562ccf83ac4d83f60502
treec18d2c894a3a182ffa9b3d27b7277bf7234fef67
parent1a8fe48d094e06d654d2bce6f20d3553846d2bb4
symlite: fix warnings given by gcc 4.8

Compiling ../src/SymLite-elf.C
../src/SymLite-elf.C: In member function ‘virtual long unsigned int Dyninst::SymElf::getSymbolSize(const Dyninst::Symbol_t&)’:
../src/SymLite-elf.C:300:173: warning: variable ‘name’ set but not used [-Wunused-but-set-variable]
    GET_SYMBOL(sym, shdr, symbol, name, idx);
                                                                                                                                                                             ^
../src/SymLite-elf.C: In member function ‘virtual Dyninst::Offset Dyninst::SymElf::getSymbolOffset(const Dyninst::Symbol_t&)’:
../src/SymLite-elf.C:314:173: warning: variable ‘name’ set but not used [-Wunused-but-set-variable]
    GET_SYMBOL(sym, shdr, symbols, name, idx);
                                                                                                                                                                             ^
../src/SymLite-elf.C: In member function ‘virtual Dyninst::Offset Dyninst::SymElf::getSymbolTOC(const Dyninst::Symbol_t&)’:
../src/SymLite-elf.C:321:173: warning: variable ‘name’ set but not used [-Wunused-but-set-variable]
    GET_SYMBOL(sym, shdr, symbols, name, idx);
                                                                                                                                                                             ^
../src/SymLite-elf.C: In member function ‘virtual std::string Dyninst::SymElf::getSymbolName(const Dyninst::Symbol_t&)’:
../src/SymLite-elf.C:328:284: warning: variable ‘idx’ set but not used [-Wunused-but-set-variable]
    GET_SYMBOL(sym, shdr, symbols, name, idx);
                                                                                                                                                                                                                                                                                            ^
../src/SymLite-elf.C:328:358: warning: variable ‘symbols’ set but not used [-Wunused-but-set-variable]
    GET_SYMBOL(sym, shdr, symbols, name, idx);
                                                                                                                                                                                                                                                                                                                                                                      ^
../src/SymLite-elf.C: In function ‘int symcache_cmp(const void*, const void*)’:
../src/SymLite-elf.C:365:42: warning: cast from type ‘const void*’ to type ‘Dyninst::SymCacheEntry*’ casts away qualifiers [-Wcast-qual]
    SymCacheEntry *aa = (SymCacheEntry *) a;
                                          ^
../src/SymLite-elf.C:366:42: warning: cast from type ‘const void*’ to type ‘Dyninst::SymCacheEntry*’ casts away qualifiers [-Wcast-qual]
    SymCacheEntry *bb = (SymCacheEntry *) b;
                                          ^
../src/SymLite-elf.C: In member function ‘long unsigned int Dyninst::SymElf::getSymOffset(const Dyninst::Elf_X_Sym&, unsigned int)’:
../src/SymLite-elf.C:381:76: warning: cast from type ‘const char*’ to type ‘long unsigned int*’ casts away qualifiers [-Wcast-qual]
          sym_offset = *((unsigned long *) (odp_data + sym_offset - odp_addr));
                                                                            ^
../src/SymLite-elf.C: In member function ‘long unsigned int Dyninst::SymElf::getSymTOC(const Dyninst::Elf_X_Sym&, unsigned int)’:
../src/SymLite-elf.C:399:97: warning: cast from type ‘const char*’ to type ‘long unsigned int*’ casts away qualifiers [-Wcast-qual]
       unsigned long toc = *((unsigned long *) (odp_data + (sym_offset - odp_addr + sizeof(long))));
                                                                                                 ^
../src/SymLite-elf.C: In member function ‘void Dyninst::SymElf::createSymCache()’:
../src/SymLite-elf.C:441:260: warning: variable ‘str_buffer’ set but not used [-Wunused-but-set-variable]
       FOR_EACH_SYMBOL(shdr, symbols, str_buffer, idx)
                                                                                                                                                                                                                                                                    ^
symlite/src/SymLite-elf.C