diff options
author | Eike Ziller <eike.ziller@qt.io> | 2021-03-22 14:49:25 +0100 |
---|---|---|
committer | Eike Ziller <eike.ziller@qt.io> | 2021-03-25 08:34:23 +0000 |
commit | 84180a4bbe9fad1426b6f6633b3d3b2f8d14d361 (patch) | |
tree | 2e51ae9a70fba655f428e276b3bb34e2ec1c85c9 | |
parent | 6998eeec65ad30d67495e71dc3e2486c5a390d32 (diff) |
Fix build with Qt 6
Explicitly cast some qsizetype to int.
Explicitly include time.h for time_t, which possibly was included by
Qt headers before, and is needed for libelf.h (ar_date)
Change-Id: I03807cbd2bb7e25e736a7842fd45b919db274488
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
-rw-r--r-- | app/perfdwarfdiecache.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/app/perfdwarfdiecache.cpp b/app/perfdwarfdiecache.cpp index 4b70c0b..12dbb67 100644 --- a/app/perfdwarfdiecache.cpp +++ b/app/perfdwarfdiecache.cpp @@ -17,6 +17,8 @@ ** ****************************************************************************/ +#include <time.h> + #include "perfdwarfdiecache.h" #include "perfeucompat.h" @@ -186,7 +188,7 @@ void prependScopeNames(QByteArray &name, Dwarf_Die *die, QHash<Dwarf_Off, QByteA if (auto scopeLinkageName = linkageName(scope)) { // prepend the fully qualified linkage name name.prepend("::"); - cacheOps.append({scopeOffset, name.size()}); + cacheOps.append({scopeOffset, int(name.size())}); // we have to demangle the scope linkage name, otherwise we get a // mish-mash of mangled and non-mangled names name.prepend(demangle(scopeLinkageName)); @@ -197,15 +199,15 @@ void prependScopeNames(QByteArray &name, Dwarf_Die *die, QHash<Dwarf_Off, QByteA if (auto scopeName = dwarf_diename(scope)) { // prepend this scope's name, e.g. the class or namespace name name.prepend("::"); - cacheOps.append({scopeOffset, name.size()}); + cacheOps.append({scopeOffset, int(name.size())}); name.prepend(scopeName); } if (auto specification = specificationDie(scope, &dieMem)) { eu_compat_free(scopes); scopes = nullptr; - cacheOps.append({scopeOffset, name.size()}); - cacheOps.append({dwarf_dieoffset(specification), name.size()}); + cacheOps.append({scopeOffset, int(name.size())}); + cacheOps.append({dwarf_dieoffset(specification), int(name.size())}); // follow the scope's specification DIE instead prependScopeNames(name, specification, cache); break; |