Skip to content

Commit

Permalink
build: fix linux compilation warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
bamiaux committed Sep 20, 2018
1 parent 8bcb6f2 commit 9ab7b0e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 26 deletions.
4 changes: 2 additions & 2 deletions YaLibs/YaToolsIDALib/Events.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -187,14 +187,14 @@ namespace
if(equal)
continue;

LOG(DEBUG, "local_type: 0x%016llx %s %s\n", id, type.name.c_str(), added ? "added" : "updated");
LOG(DEBUG, "local_type: 0x%016" PRIx64 " %s %s\n", id, type.name.c_str(), added ? "added" : "updated");
update(id, type);
}

// remaining local types have been deleted
for(const auto& it : m.ids)
{
LOG(DEBUG, "local_type: deleted 0x%016llx %s\n", it.first, it.second.name.c_str());
LOG(DEBUG, "local_type: deleted 0x%016" PRIx64 " %s\n", it.first, it.second.name.c_str());
update(it.first, it.second);
local_types::remove(it.second.name.c_str());
}
Expand Down
4 changes: 2 additions & 2 deletions YaLibs/YaToolsIDALib/IdaVisitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1273,7 +1273,7 @@ namespace
const auto fi = visitor.tids_.find(id);
if(fi == visitor.tids_.end())
{
LOG(ERROR, "make_data: 0x%" PRIxEA " invalid xref 0x%llx\n", ea, id);
LOG(ERROR, "make_data: 0x%" PRIxEA " invalid xref 0x%" PRIx64 "\n", ea, id);
return WALK_CONTINUE;
}

Expand All @@ -1283,7 +1283,7 @@ namespace
else if(fi->second.type == OBJECT_TYPE_LOCAL_TYPE)
is_xref_applied = try_apply_local_type_to_data(version, ea, fi->second, attrs);
if(!is_xref_applied)
LOG(ERROR, "make_data: 0x%" PRIxEA " unable to set %s 0x%llx\n", ea, get_object_type_string(fi->second.type), id);
LOG(ERROR, "make_data: 0x%" PRIxEA " unable to set %s 0x%" PRIx64 "\n", ea, get_object_type_string(fi->second.type), id);
return WALK_CONTINUE;
});
if(is_xref_applied)
Expand Down
19 changes: 0 additions & 19 deletions YaLibs/YaToolsIDALib/Strucs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -180,25 +180,6 @@ namespace strucs
}
}

namespace
{
YaToolObjectId hash_with(tinfo_t& tif, qstring& qbuf, Tag& tag, uint32_t ord)
{
auto ok = tif.get_numbered_type(nullptr, ord);
if(!ok)
return 0;

ok = tif.print(&qbuf);
if(!ok)
return 0;

const auto r = hash_local(qbuf.c_str());
static_assert(sizeof tag.data == sizeof r.tag.data, "tag mismatch");
memcpy(tag.data, r.tag.data, sizeof r.tag.data);
return r.id;
}
}

namespace local_types
{
bool identify(Type* type, uint32_t ord)
Expand Down
6 changes: 3 additions & 3 deletions YaLibs/YaToolsIDALib/YaHelpers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ namespace ya
struct Dependency
{
Dependency(YaToolObjectType_e type, YaToolObjectId id, tid_t tid)
: type(type)
, id(id)
: id(id)
, type(type)
, tid(tid)
{
}
Expand Down Expand Up @@ -203,7 +203,7 @@ namespace ya
inline uint32_t get_ordinal_qty()
{
const auto max = ::get_ordinal_qty(nullptr);
return max == ~0 ? 0 : max;
return max == ~0U ? 0 : max;
}

bool is_testing_mode();
Expand Down

0 comments on commit 9ab7b0e

Please sign in to comment.