Suppress Eclipse warnings about unused allocations
In each of these cases, the constructor directly or indirectly has side effects that we want to keep, even if the object itself is not retained and used by eht code that invokes `new`.
This commit is contained in:
parent
97bf43c0b9
commit
214e0caa86
|
@ -60,7 +60,8 @@ public class JsViewerDriver extends JSCallGraphBuilderUtil {
|
|||
CallGraph cg = builder.makeCallGraph(builder.getOptions());
|
||||
PointerAnalysis<InstanceKey> pa = builder.getPointerAnalysis();
|
||||
|
||||
new JsViewer(cg, pa);
|
||||
@SuppressWarnings("unused")
|
||||
JsViewer jsViewer = new JsViewer(cg, pa);
|
||||
}
|
||||
|
||||
private static SourceModule[] getSources(boolean domless, URL url)
|
||||
|
|
|
@ -16,6 +16,7 @@ import com.ibm.wala.types.TypeReference;
|
|||
|
||||
public class JSPrimitiveType extends PrimitiveType {
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public static void init() {
|
||||
new JSPrimitiveType(JavaScriptTypes.Undefined, -1);
|
||||
|
||||
|
|
|
@ -68,7 +68,8 @@ public class JavaViewerDriver {
|
|||
CallGraph cg = builder.makeCallGraph(options, null);
|
||||
|
||||
PointerAnalysis<InstanceKey> pa = builder.getPointerAnalysis();
|
||||
new WalaViewer(cg, pa);
|
||||
@SuppressWarnings("unused")
|
||||
WalaViewer walaViewer = new WalaViewer(cg, pa);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -68,7 +68,8 @@ public final class LineNumberTableReader extends AttributeReader {
|
|||
}
|
||||
|
||||
// check length
|
||||
new LineNumberTableReader(iter);
|
||||
@SuppressWarnings("unused")
|
||||
LineNumberTableReader lineNumberTableReader = new LineNumberTableReader(iter);
|
||||
int attr = iter.getRawOffset();
|
||||
int count = cr.getUShort(attr + 6);
|
||||
int offset = attr + 8;
|
||||
|
|
|
@ -76,7 +76,8 @@ public final class LocalVariableTableReader extends AttributeReader {
|
|||
}
|
||||
|
||||
// check length
|
||||
new LocalVariableTableReader(iter);
|
||||
@SuppressWarnings("unused")
|
||||
LocalVariableTableReader localVariableTableReader = new LocalVariableTableReader(iter);
|
||||
int attr = iter.getRawOffset();
|
||||
int count = cr.getUShort(attr + 6);
|
||||
int offset = attr + 8;
|
||||
|
|
Loading…
Reference in New Issue