diff options
| author | Cristallix <Cristallix@users.noreply.github.com> | 2020-04-20 23:59:59 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-04-21 07:59:59 +1000 |
| commit | 4738113f293ac2477a553225a24b6c489c6855f1 (patch) | |
| tree | 1878f27da3cc7e73171c7d905447f1eb9f25cefc /Ryujinx.HLE/HOS | |
| parent | 91fa1debd4c5791a12733d75d7ce06a23a1547ff (diff) | |
Suppress warnings from fields never used or never assigned (CS0169 and CS0649) (#919)
* chore : disable unwanted warnings and minor code cleanup
* chore : remove more warnings
* fix : reorder struct correctly
* fix : restore _isKernel and remove useless comment
* fix : copy/paste error
* fix : restore CallMethod call
* fix : whitespace
* chore : clean using
* feat : remove warnings
* fix : simplify warning removal on struct
* fix : revert fields deletion and code clean up
* fix : re-add RE value
* fix : typo
Diffstat (limited to 'Ryujinx.HLE/HOS')
14 files changed, 24 insertions, 8 deletions
diff --git a/Ryujinx.HLE/HOS/Horizon.cs b/Ryujinx.HLE/HOS/Horizon.cs index fb961a2d..7f7fd4c6 100644 --- a/Ryujinx.HLE/HOS/Horizon.cs +++ b/Ryujinx.HLE/HOS/Horizon.cs @@ -114,7 +114,9 @@ namespace Ryujinx.HLE.HOS public Keyset KeySet => Device.FileSystem.KeySet; +#pragma warning disable CS0649 private bool _hasStarted; +#pragma warning restore CS0649 private bool _isDisposed; public BlitStruct<ApplicationControlProperty> ControlData { get; set; } diff --git a/Ryujinx.HLE/HOS/Kernel/Ipc/KLightSession.cs b/Ryujinx.HLE/HOS/Kernel/Ipc/KLightSession.cs index a12a1986..166de065 100644 --- a/Ryujinx.HLE/HOS/Kernel/Ipc/KLightSession.cs +++ b/Ryujinx.HLE/HOS/Kernel/Ipc/KLightSession.cs @@ -7,14 +7,10 @@ namespace Ryujinx.HLE.HOS.Kernel.Ipc public KLightServerSession ServerSession { get; } public KLightClientSession ClientSession { get; } - private bool _hasBeenInitialized; - public KLightSession(Horizon system) : base(system) { ServerSession = new KLightServerSession(system, this); ClientSession = new KLightClientSession(system, this); - - _hasBeenInitialized = true; } } }
\ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Kernel/Memory/KMemoryManager.cs b/Ryujinx.HLE/HOS/Kernel/Memory/KMemoryManager.cs index fd2078ee..3379e912 100644 --- a/Ryujinx.HLE/HOS/Kernel/Memory/KMemoryManager.cs +++ b/Ryujinx.HLE/HOS/Kernel/Memory/KMemoryManager.cs @@ -64,6 +64,7 @@ namespace Ryujinx.HLE.HOS.Kernel.Memory public int AddrSpaceWidth { get; private set; } private bool _isKernel; + private bool _aslrEnabled; private KMemoryBlockAllocator _blockAllocator; @@ -78,6 +79,8 @@ namespace Ryujinx.HLE.HOS.Kernel.Memory _cpuMemory = cpuMemory; _blocks = new LinkedList<KMemoryBlock>(); + + _isKernel = false; } private static readonly int[] AddrSpaceSizes = new int[] { 32, 36, 32, 39 }; diff --git a/Ryujinx.HLE/HOS/Kernel/Threading/KThread.cs b/Ryujinx.HLE/HOS/Kernel/Threading/KThread.cs index cd60c955..e629be45 100644 --- a/Ryujinx.HLE/HOS/Kernel/Threading/KThread.cs +++ b/Ryujinx.HLE/HOS/Kernel/Threading/KThread.cs @@ -66,7 +66,9 @@ namespace Ryujinx.HLE.HOS.Kernel.Threading private long _affinityMaskOverride; private int _preferredCoreOverride; +#pragma warning disable CS0649 private int _affinityOverrideCount; +#pragma warning restore CS0649 public ThreadSchedState SchedFlags { get; private set; } diff --git a/Ryujinx.HLE/HOS/Services/Arp/ApplicationLaunchProperty.cs b/Ryujinx.HLE/HOS/Services/Arp/ApplicationLaunchProperty.cs index 686577d7..25c84984 100644 --- a/Ryujinx.HLE/HOS/Services/Arp/ApplicationLaunchProperty.cs +++ b/Ryujinx.HLE/HOS/Services/Arp/ApplicationLaunchProperty.cs @@ -8,7 +8,9 @@ namespace Ryujinx.HLE.HOS.Services.Arp public int Version; public byte BaseGameStorageId; public byte UpdateGameStorageId; +#pragma warning disable CS0649 public short Padding; +#pragma warning restore CS0649 public static ApplicationLaunchProperty Default { diff --git a/Ryujinx.HLE/HOS/Services/Audio/AudioRendererManager/Types/UpdateDataHeader.cs b/Ryujinx.HLE/HOS/Services/Audio/AudioRendererManager/Types/UpdateDataHeader.cs index f4a77f2f..6adb874c 100644 --- a/Ryujinx.HLE/HOS/Services/Audio/AudioRendererManager/Types/UpdateDataHeader.cs +++ b/Ryujinx.HLE/HOS/Services/Audio/AudioRendererManager/Types/UpdateDataHeader.cs @@ -2,6 +2,7 @@ { struct UpdateDataHeader { +#pragma warning disable CS0649 public int Revision; public int BehaviorSize; public int MemoryPoolSize; @@ -18,5 +19,6 @@ public int Unknown34; public int Unknown38; public int TotalSize; +#pragma warning restore CS0649 } }
\ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Bluetooth/IBluetoothDriver.cs b/Ryujinx.HLE/HOS/Services/Bluetooth/IBluetoothDriver.cs index fc20ec30..8b9a8a94 100644 --- a/Ryujinx.HLE/HOS/Services/Bluetooth/IBluetoothDriver.cs +++ b/Ryujinx.HLE/HOS/Services/Bluetooth/IBluetoothDriver.cs @@ -9,7 +9,9 @@ namespace Ryujinx.HLE.HOS.Services.Bluetooth [Service("btdrv")] class IBluetoothDriver : IpcService { +#pragma warning disable CS0169 private string _unknownLowEnergy; +#pragma warning restore CS0169 public IBluetoothDriver(ServiceCtx context) { } diff --git a/Ryujinx.HLE/HOS/Services/Hid/IHidServer.cs b/Ryujinx.HLE/HOS/Services/Hid/IHidServer.cs index e34c4213..5e84eda6 100644 --- a/Ryujinx.HLE/HOS/Services/Hid/IHidServer.cs +++ b/Ryujinx.HLE/HOS/Services/Hid/IHidServer.cs @@ -26,7 +26,9 @@ namespace Ryujinx.HLE.HOS.Services.Hid private long _npadCommunicationMode; private uint _accelerometerPlayMode; +#pragma warning disable CS0649 private long _vibrationGcErmCommand; +#pragma warning restore CS0649 private float _sevenSixAxisSensorFusionStrength; private HidSensorFusionParameters _sensorFusionParams; diff --git a/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostAsGpu/NvHostAsGpuDeviceFile.cs b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostAsGpu/NvHostAsGpuDeviceFile.cs index 6653c0f0..a19e180f 100644 --- a/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostAsGpu/NvHostAsGpuDeviceFile.cs +++ b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostAsGpu/NvHostAsGpuDeviceFile.cs @@ -1,12 +1,10 @@ -using Ryujinx.Common; -using Ryujinx.Common.Logging; +using Ryujinx.Common.Logging; using Ryujinx.Graphics.Gpu.Memory; using Ryujinx.HLE.HOS.Kernel.Process; using Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostAsGpu.Types; using Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvMap; using System; using System.Collections.Concurrent; -using System.Diagnostics; namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostAsGpu { diff --git a/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostAsGpu/Types/UnmapBufferArguments.cs b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostAsGpu/Types/UnmapBufferArguments.cs index 1ef880af..7f41f26a 100644 --- a/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostAsGpu/Types/UnmapBufferArguments.cs +++ b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostAsGpu/Types/UnmapBufferArguments.cs @@ -2,6 +2,8 @@ { struct UnmapBufferArguments { +#pragma warning disable CS0649 public long Offset; +#pragma warning restore CS0649 } } diff --git a/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostChannel/Types/NvChannel.cs b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostChannel/Types/NvChannel.cs index 22cfba3d..8e2c6ca3 100644 --- a/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostChannel/Types/NvChannel.cs +++ b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostChannel/Types/NvChannel.cs @@ -2,8 +2,10 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostChannel { class NvChannel { +#pragma warning disable CS0649 public int Timeout; public int SubmitTimeout; public int Timeslice; +#pragma warning restore CS0649 } }
\ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostCtrlGpu/NvHostCtrlGpuDeviceFile.cs b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostCtrlGpu/NvHostCtrlGpuDeviceFile.cs index ac7092a6..53d4c98c 100644 --- a/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostCtrlGpu/NvHostCtrlGpuDeviceFile.cs +++ b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostCtrlGpu/NvHostCtrlGpuDeviceFile.cs @@ -1,6 +1,5 @@ using Ryujinx.Common.Logging; using Ryujinx.HLE.HOS.Kernel.Common; -using Ryujinx.HLE.HOS.Kernel.Process; using Ryujinx.HLE.HOS.Kernel.Threading; using Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostCtrlGpu.Types; using System; diff --git a/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostCtrlGpu/Types/GetCharacteristicsArguments.cs b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostCtrlGpu/Types/GetCharacteristicsArguments.cs index 5b44109a..d6648178 100644 --- a/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostCtrlGpu/Types/GetCharacteristicsArguments.cs +++ b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostCtrlGpu/Types/GetCharacteristicsArguments.cs @@ -44,8 +44,10 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostCtrlGpu.Types struct CharacteristicsHeader { +#pragma warning disable CS0649 public long BufferSize; public long BufferAddress; +#pragma warning restore CS0649 } [StructLayout(LayoutKind.Sequential)] diff --git a/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvMap/Types/NvMapHandle.cs b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvMap/Types/NvMapHandle.cs index 3903b77c..88ec1487 100644 --- a/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvMap/Types/NvMapHandle.cs +++ b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvMap/Types/NvMapHandle.cs @@ -4,8 +4,10 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvMap { class NvMapHandle { +#pragma warning disable CS0649 public int Handle; public int Id; +#pragma warning restore CS0649 public int Size; public int Align; public int Kind; |
