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

@@ -155,9 +155,6 @@ namespace Ryujinx.HLE.HOS.Services.Nifm.StaticService
public ResultCode IsAnyInternetRequestAccepted(ServiceCtx context)
{
ulong position = context.Request.PtrBuff[0].Position;
#pragma warning disable IDE0059 // Remove unnecessary value assignment
ulong size = context.Request.PtrBuff[0].Size;
#pragma warning restore IDE0059
int clientId = context.Memory.Read<int>(position);

View File

@@ -21,9 +21,7 @@ namespace Ryujinx.HLE.HOS.Services.Nifm.StaticService
private int _event0Handle;
private int _event1Handle;
#pragma warning disable IDE0052 // Remove unread private member
private readonly uint _version;
#pragma warning restore IDE0052
public IRequest(Horizon system, uint version)
{
@@ -118,9 +116,7 @@ namespace Ryujinx.HLE.HOS.Services.Nifm.StaticService
// GetAppletInfo(u32) -> (u32, u32, u32, buffer<bytes, 6>)
public ResultCode GetAppletInfo(ServiceCtx context)
{
#pragma warning disable IDE0059 // Remove unnecessary value assignment
uint themeColor = context.RequestData.ReadUInt32();
#pragma warning restore IDE0059
_ = context.RequestData.ReadUInt32(); // Theme color
Logger.Stub?.PrintStub(LogClass.ServiceNifm);

View File

@@ -2,7 +2,7 @@ using System.Runtime.InteropServices;
namespace Ryujinx.HLE.HOS.Services.Nifm.StaticService.Types
{
[StructLayout(LayoutKind.Sequential)]
[StructLayout(LayoutKind.Sequential, Pack = 1)]
struct InternetConnectionStatus
{
public InternetConnectionType Type;

View File

@@ -4,7 +4,7 @@ using System.Runtime.InteropServices;
namespace Ryujinx.HLE.HOS.Services.Nifm.StaticService.Types
{
[StructLayout(LayoutKind.Sequential)]
[StructLayout(LayoutKind.Sequential, Pack = 1)]
struct IpV4Address
{
public uint Address;