forked from qt-creator/qt-creator
ElfReader: Suppress a coverity message
Add two neutral enum values mimicing what llvm/BinaryFormat/ELF.h has. *** CID 1518686: Uninitialized variables (UNINIT) /qt-creator/src/plugins/debugger/gdb/gdbengine.cpp: 3940 in Debugger::Internal::GdbEngine::handleGdbStarted()() 3934 // Addint executable to modules list. 3935 Module module; 3936 module.startAddress = 0; 3937 module.endAddress = 0; 3938 module.modulePath = rp.inferior.command.executable().toString(); 3939 module.moduleName = "<executable>"; >>> CID 1518686: Uninitialized variables (UNINIT) >>> Using uninitialized value "module.elfData.endian" when calling "updateModule". Looks like a false positive, module.elfData.endian is not used in updateModule() and surroundings. Change-Id: Ic8071add87b1df894819d49ea55dfa705b81c3ce Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
@@ -83,6 +83,7 @@ enum ElfEndian
|
|||||||
|
|
||||||
enum ElfClass
|
enum ElfClass
|
||||||
{
|
{
|
||||||
|
Elf_ELFCLASSNONE = 0,
|
||||||
Elf_ELFCLASS32 = 1,
|
Elf_ELFCLASS32 = 1,
|
||||||
Elf_ELFCLASS64 = 2
|
Elf_ELFCLASS64 = 2
|
||||||
};
|
};
|
||||||
@@ -98,6 +99,7 @@ enum ElfType
|
|||||||
|
|
||||||
enum ElfMachine
|
enum ElfMachine
|
||||||
{
|
{
|
||||||
|
Elf_EM_NONE = 0,
|
||||||
Elf_EM_386 = 3,
|
Elf_EM_386 = 3,
|
||||||
Elf_EM_ARM = 40,
|
Elf_EM_ARM = 40,
|
||||||
Elf_EM_X86_64 = 62
|
Elf_EM_X86_64 = 62
|
||||||
@@ -142,10 +144,10 @@ public:
|
|||||||
int indexOf(const QByteArray &name) const;
|
int indexOf(const QByteArray &name) const;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
ElfEndian endian;
|
ElfEndian endian = Elf_ELFDATANONE;
|
||||||
ElfType elftype;
|
ElfType elftype = Elf_ET_NONE;
|
||||||
ElfMachine elfmachine;
|
ElfMachine elfmachine = Elf_EM_NONE;
|
||||||
ElfClass elfclass;
|
ElfClass elfclass = Elf_ELFCLASSNONE;
|
||||||
quint64 entryPoint = 0;
|
quint64 entryPoint = 0;
|
||||||
QByteArray debugLink;
|
QByteArray debugLink;
|
||||||
QByteArray buildId;
|
QByteArray buildId;
|
||||||
|
Reference in New Issue
Block a user