parseAPI: fix warnings given by gcc 4.8
authorJosh Stone <jistone@redhat.com>
Thu, 30 May 2013 20:24:22 +0000 (13:24 -0700)
committerJosh Stone <jistone@redhat.com>
Thu, 30 May 2013 20:24:22 +0000 (13:24 -0700)
commiteada272f3b16e106a2b85e546effd72962703b84
tree5ef18bd1eaf2c0fc25f0d444e66b7024ef32b236
parente5e11d8b7172e3d5846b0d01bdf3e7aff0842e51
parseAPI: fix warnings given by gcc 4.8

Compiling ../src/IA_IAPI.C
../src/IA_IAPI.C: In member function ‘virtual bool Dyninst::InsnAdapter::IA_IAPI::isGarbageInsn() const’:
../src/IA_IAPI.C:350:45: warning: cast from type ‘const void*’ to type ‘char*’ casts away qualifiers [-Wcast-qual]
                 0 == ((char*)curInsn()->ptr())[0] &&
                                             ^
../src/IA_IAPI.C:351:45: warning: cast from type ‘const void*’ to type ‘char*’ casts away qualifiers [-Wcast-qual]
                 0 == ((char*)curInsn()->ptr())[1])
                                             ^
../src/IA_IAPI.C:373:44: warning: cast from type ‘const void*’ to type ‘char*’ casts away qualifiers [-Wcast-qual]
             switch (((char*)curInsn()->ptr())[0]) {
                                            ^
../src/IA_IAPI.C:384:67: warning: cast from type ‘const void*’ to type ‘unsigned char*’ casts away qualifiers [-Wcast-qual]
                         ((0xa0 == ((unsigned char*)curInsn()->ptr())[1]) || (0xa8 == ((unsigned char*)curInsn()->ptr())[1])))
                                                                   ^
../src/IA_IAPI.C:384:118: warning: cast from type ‘const void*’ to type ‘unsigned char*’ casts away qualifiers [-Wcast-qual]
                         ((0xa0 == ((unsigned char*)curInsn()->ptr())[1]) || (0xa8 == ((unsigned char*)curInsn()->ptr())[1])))
                                                                                                                      ^
Compiling ../src/IA_x86Details.C
../src/IA_x86Details.C: In member function ‘boost::tuples::tuple<boost::shared_ptr<Dyninst::InstructionAPI::Instruction>, boost::shared_ptr<Dyninst::InstructionAPI::Instruction>, bool> Dyninst::InsnAdapter::IA_x86Details::findMaxSwitchInsn(Dyninst::ParseAPI::Block*)’:
../src/IA_x86Details.C:623:13: warning: variable ‘maxSwitchAddr’ set but not used [-Wunused-but-set-variable]
     Address maxSwitchAddr = 0;
             ^
parseAPI/src/IA_IAPI.C
parseAPI/src/IA_x86Details.C