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
|| l.identifierOrTemplateInstance.identifier.text != "length")
goto end;
const(Token) token = l.identifierOrTemplateInstance.identifier;
addErrorMessage(addExpression, "dscanner.suspicious.length_subtraction",
"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);
return [];
}
File f = File(fileName);
ubyte[] sourceCode;
sourceCode = cast(ubyte[]) fileName.read();
sourceCode.processBOM(fileName);