Structural and Memory Safety Improvements, Analyzer Cleanup (ryubing/ryujinx!47)

See merge request ryubing/ryujinx!47
This commit is contained in:
MrKev
2025-06-11 17:58:27 -05:00
committed by LotP
parent d03ae9c164
commit ea027d65a7
309 changed files with 1018 additions and 1247 deletions

View File

@@ -1,5 +1,3 @@
using System.Diagnostics.CodeAnalysis;
namespace Ryujinx.HLE.Loaders.Elf
{
enum ElfDynamicTag

View File

@@ -2,13 +2,13 @@ namespace Ryujinx.HLE.Loaders.Elf
{
struct ElfSymbol32
{
#pragma warning disable CS0649 // Field is never assigned to
public uint NameOffset;
public uint ValueAddress;
public uint Size;
public byte Info;
public byte Other;
public ushort SectionIndex;
#pragma warning restore CS0649
}
}

View File

@@ -2,13 +2,13 @@ namespace Ryujinx.HLE.Loaders.Elf
{
struct ElfSymbol64
{
#pragma warning disable CS0649 // Field is never assigned to
public uint NameOffset;
public byte Info;
public byte Other;
public ushort SectionIndex;
public ulong ValueAddress;
public ulong Size;
#pragma warning restore CS0649
}
}

View File

@@ -30,9 +30,8 @@ namespace Ryujinx.HLE.Loaders.Npdm
{
throw new InvalidNpdmException("FsAccessHeader is corrupted!");
}
#pragma warning disable IDE0059 // Remove unnecessary value assignment
int contentOwnerIdSize = reader.ReadInt32();
#pragma warning restore IDE0059
_ = reader.ReadInt32(); // contentOwnerId size
int dataAndContentOwnerIdSize = reader.ReadInt32();
if (dataAndContentOwnerIdSize != 0x1c)

View File

@@ -68,11 +68,10 @@ namespace Ryujinx.HLE.Loaders.Npdm
stream.Seek(0x30, SeekOrigin.Current);
int aci0Offset = reader.ReadInt32();
#pragma warning disable IDE0059 // Remove unnecessary value assignment
int aci0Size = reader.ReadInt32();
_ = reader.ReadInt32(); // aci0 size
int acidOffset = reader.ReadInt32();
int acidSize = reader.ReadInt32();
#pragma warning restore IDE0059
_ = reader.ReadInt32(); // acid size
Aci0 = new Aci0(stream, aci0Offset);
Acid = new Acid(stream, acidOffset);

View File

@@ -9,7 +9,6 @@ using Ryujinx.Common.Logging;
using Ryujinx.Graphics.Gpu;
using Ryujinx.HLE.Loaders.Executables;
using Ryujinx.Memory;
using System;
using System.Linq;
using static Ryujinx.HLE.HOS.ModLoader;

View File

@@ -6,7 +6,6 @@ using Ryujinx.Cpu;
using Ryujinx.HLE.HOS.SystemState;
using Ryujinx.HLE.Loaders.Processes.Extensions;
using Ryujinx.Horizon.Common;
using System;
namespace Ryujinx.HLE.Loaders.Processes
{