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
This commit is contained in:
Cristallix 2020-04-20 23:59:59 +02:00 committed by GitHub
parent 91fa1debd4
commit 4738113f29
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
65 changed files with 127 additions and 28 deletions

View file

@ -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
{

View file

@ -2,6 +2,8 @@
{
struct UnmapBufferArguments
{
#pragma warning disable CS0649
public long Offset;
#pragma warning restore CS0649
}
}

View file

@ -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
}
}

View file

@ -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;

View file

@ -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)]

View file

@ -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;