Fix Warnings by g++ 10.2 (#2523)

This commit is contained in:
Florian Märkl 2020-12-17 20:14:40 +01:00 committed by GitHub
parent 0574c50981
commit 269cedd36e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 4 deletions

View File

@ -57,7 +57,7 @@ void R2DecDecompiler::decompileAt(RVA addr)
if (lineObject.isEmpty()) { if (lineObject.isEmpty()) {
continue; continue;
} }
RzCodeAnnotation annotationi = { 0 }; RzCodeAnnotation annotationi = {};
annotationi.start = codeString.length(); annotationi.start = codeString.length();
codeString.append(lineObject["str"].toString() + "\n"); codeString.append(lineObject["str"].toString() + "\n");
annotationi.end = codeString.length(); annotationi.end = codeString.length();

View File

@ -117,10 +117,13 @@ bool ExportsProxyModel::lessThan(const QModelIndex &left, const QModelIndex &rig
return leftExp.vaddr < rightExp.vaddr; return leftExp.vaddr < rightExp.vaddr;
// fallthrough // fallthrough
case ExportsModel::NameColumn: case ExportsModel::NameColumn:
if (leftExp.name != rightExp.name)
return leftExp.name < rightExp.name; return leftExp.name < rightExp.name;
// fallthrough
case ExportsModel::TypeColumn: case ExportsModel::TypeColumn:
if (leftExp.type != rightExp.type) if (leftExp.type != rightExp.type)
return leftExp.type < rightExp.type; return leftExp.type < rightExp.type;
// fallthrough
case ExportsModel::CommentColumn: case ExportsModel::CommentColumn:
return Core()->getCommentAt(leftExp.vaddr) < Core()->getCommentAt(rightExp.vaddr); return Core()->getCommentAt(leftExp.vaddr) < Core()->getCommentAt(rightExp.vaddr);
default: default:

View File

@ -1336,7 +1336,7 @@ static void optimizeLinearProgramPass(
int g = queue.top().second; int g = queue.top().second;
int size = queue.top().first; int size = queue.top().first;
queue.pop(); queue.pop();
if (size != edgeCount[g] || processed[g]) { if ((size_t)size != edgeCount[g] || processed[g]) {
continue; continue;
} }
int direction = objectiveFunction[g]; int direction = objectiveFunction[g];

View File

@ -143,7 +143,7 @@ bool ImportsProxyModel::lessThan(const QModelIndex &left, const QModelIndex &rig
case ImportsModel::LibraryColumn: case ImportsModel::LibraryColumn:
if (leftImport.libname != rightImport.libname) if (leftImport.libname != rightImport.libname)
return leftImport.libname < rightImport.libname; return leftImport.libname < rightImport.libname;
// Fallthrough. Sort by Library and then by import name // fallthrough
case ImportsModel::NameColumn: case ImportsModel::NameColumn:
return leftImport.name < rightImport.name; return leftImport.name < rightImport.name;
case ImportsModel::CommentColumn: case ImportsModel::CommentColumn: