mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
C#: Fix compiler warnings.
This commit is contained in:
@@ -20,7 +20,10 @@ namespace Semmle.Extraction.CSharp.Entities
|
||||
|
||||
protected override void Populate(TextWriter trapFile)
|
||||
{
|
||||
var info = Context.GetModel(node).GetSymbolInfo(node.Name);
|
||||
// This is guaranteed to be non-null as we only deal with "using namespace" not "using X = Y"
|
||||
var name = node.Name!;
|
||||
|
||||
var info = Context.GetModel(node).GetSymbolInfo(name);
|
||||
|
||||
if (node.StaticKeyword.IsKind(SyntaxKind.None))
|
||||
{
|
||||
@@ -33,7 +36,7 @@ namespace Semmle.Extraction.CSharp.Entities
|
||||
}
|
||||
else
|
||||
{
|
||||
Context.Extractor.MissingNamespace(node.Name.ToFullString(), Context.FromSource);
|
||||
Context.Extractor.MissingNamespace(name.ToFullString(), Context.FromSource);
|
||||
Context.ModelError(node, "Namespace not found");
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user