remove unused variables

This commit is contained in:
WebFreak001 2023-06-29 14:41:01 +02:00 committed by Jan Jurzitza
parent e3604d6ce6
commit bad253bad5
2 changed files with 1 additions and 2 deletions

View File

@ -40,7 +40,6 @@ final class LengthSubtractionCheck : BaseAnalyzer
if (l.identifierOrTemplateInstance is null if (l.identifierOrTemplateInstance is null
|| l.identifierOrTemplateInstance.identifier.text != "length") || l.identifierOrTemplateInstance.identifier.text != "length")
goto end; goto end;
const(Token) token = l.identifierOrTemplateInstance.identifier;
addErrorMessage(addExpression, "dscanner.suspicious.length_subtraction", addErrorMessage(addExpression, "dscanner.suspicious.length_subtraction",
"Avoid subtracting from '.length' as it may be unsigned."); "Avoid subtracting from '.length' as it may be unsigned.");
} }

View File

@ -73,7 +73,7 @@ ubyte[] readFile(string fileName)
stderr.writefln("%s does not exist", fileName); stderr.writefln("%s does not exist", fileName);
return []; return [];
} }
File f = File(fileName);
ubyte[] sourceCode; ubyte[] sourceCode;
sourceCode = cast(ubyte[]) fileName.read(); sourceCode = cast(ubyte[]) fileName.read();
sourceCode.processBOM(fileName); sourceCode.processBOM(fileName);