Skip to content

Fix new warning which shows up with latest roslyn #3179

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/ILLink.Tasks/CreateRuntimeRootDescriptorFile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ readonly struct FeatureSwitchMembers
public string FeatureValue { get; }
public string FeatureDefault { get; }
// Unique value to track the key
private readonly String _key;
private readonly string _key;

public FeatureSwitchMembers (string feature, string featureValue, string featureDefault)
{
Expand Down Expand Up @@ -302,7 +302,7 @@ void OutputXml (string iLLinkTrimXmlFilePath, string outputFileName)
{
XmlDocument doc = new XmlDocument ();
doc.Load (iLLinkTrimXmlFilePath);
XmlNode linkerNode = doc["linker"];
XmlElement linkerNode = doc["linker"];

if (featureSwitchMembers.Count > 0) {
foreach ((var fs, var members) in featureSwitchMembers.Select (kv => (kv.Key, kv.Value))) {
Expand Down Expand Up @@ -344,7 +344,7 @@ void OutputXml (string iLLinkTrimXmlFilePath, string outputFileName)

static void AddXmlTypeNode (XmlDocument doc, XmlNode assemblyNode, string typeName, ClassMembers members)
{
XmlNode typeNode = doc.CreateElement ("type");
XmlElement typeNode = doc.CreateElement ("type");
XmlAttribute typeFullName = doc.CreateAttribute ("fullname");
typeFullName.Value = typeName;
typeNode.Attributes.Append (typeFullName);
Expand Down
2 changes: 1 addition & 1 deletion src/linker/Linker/LinkerAttributesInformation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public IEnumerable<T> GetAttributes<T> () where T : Attribute
return attributeList.Cast<T> ();
}

static Attribute? ProcessRequiresUnreferencedCodeAttribute (LinkContext context, ICustomAttributeProvider provider, CustomAttribute customAttribute)
static RequiresUnreferencedCodeAttribute? ProcessRequiresUnreferencedCodeAttribute (LinkContext context, ICustomAttributeProvider provider, CustomAttribute customAttribute)
{
if (!(provider is MethodDefinition || provider is TypeDefinition))
return null;
Expand Down