Fix warnings by PVS-Studio

This commit is contained in:
Alexey Milovidov 2021-05-08 23:56:17 +03:00
parent e23a0d8f7e
commit ce9eda6a87
2 changed files with 5 additions and 5 deletions

View File

@ -804,7 +804,7 @@ bool Dwarf::findLocation(
findSubProgramDieForAddress(cu, die, address, base_addr_cu, subprogram);
// Subprogram is the DIE of caller function.
if (check_inline && subprogram.abbr.has_children)
if (/*check_inline &&*/ subprogram.abbr.has_children)
{
// Use an extra location and get its call file and call line, so that
// they can be used for the second last location when we don't have
@ -832,7 +832,7 @@ bool Dwarf::findLocation(
// file+line of the non-inlined outer function making the call.
// locationInfo.name is already set by the caller by looking up the
// non-inlined function @address belongs to.
info.has_file_and_line = true;
info.has_file_and_line = true; //-V1048
info.file = call_locations[0].file;
info.line = call_locations[0].line;

View File

@ -121,7 +121,7 @@ public:
struct CallLocation
{
Path file = {};
uint64_t line;
uint64_t line = 0;
std::string_view name;
};
@ -202,8 +202,8 @@ private:
// Abbreviation for a Debugging Information Entry.
struct DIEAbbreviation
{
uint64_t code;
uint64_t tag;
uint64_t code = 0;
uint64_t tag = 0;
bool has_children = false;
std::string_view attributes;