Commit d6a468f0 authored by Skylot's avatar Skylot

Don't show not important warnings

parent 69eb57cb
...@@ -91,7 +91,7 @@ public class ClassNode extends AttrNode implements ILoadable { ...@@ -91,7 +91,7 @@ public class ClassNode extends AttrNode implements ILoadable {
String fileName = dex.getString(sfIdx); String fileName = dex.getString(sfIdx);
if(!this.getFullName().contains(fileName.replace(".java", ""))) { if(!this.getFullName().contains(fileName.replace(".java", ""))) {
this.getAttributes().add(new SourceFileAttr(fileName)); this.getAttributes().add(new SourceFileAttr(fileName));
LOG.info("TODO: move class {} to {} file", this, fileName); LOG.debug("Class '{}' compiled from '{}'", this, fileName);
} }
} }
......
package jadx.dex.visitors.regions; package jadx.dex.visitors.regions;
import jadx.Consts;
import jadx.dex.attributes.AttributeFlag; import jadx.dex.attributes.AttributeFlag;
import jadx.dex.nodes.BlockNode; import jadx.dex.nodes.BlockNode;
import jadx.dex.nodes.IBlock; import jadx.dex.nodes.IBlock;
...@@ -37,8 +38,19 @@ public class CheckRegions extends AbstractVisitor { ...@@ -37,8 +38,19 @@ public class CheckRegions extends AbstractVisitor {
}; };
DepthRegionTraverser.traverseAll(mth, collectBlocks); DepthRegionTraverser.traverseAll(mth, collectBlocks);
if (mth.getBasicBlocks().size() != blocksInRegions.size()) if (mth.getBasicBlocks().size() != blocksInRegions.size()) {
mth.getAttributes().add(AttributeFlag.INCONSISTENT_CODE); for (BlockNode block : mth.getBasicBlocks()) {
if (!blocksInRegions.contains(block)) {
if (!block.getInstructions().isEmpty()) {
mth.getAttributes().add(AttributeFlag.INCONSISTENT_CODE);
if (Consts.DEBUG)
LOG.debug("Missing block: {} in {}", block, mth);
else
break;
}
}
}
}
// check loop conditions // check loop conditions
IRegionVisitor checkLoops = new AbstractRegionVisitor() { IRegionVisitor checkLoops = new AbstractRegionVisitor() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment