Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Use a pragma to fix the CS0649 warning about unused fields
  • Loading branch information
MaximLipnin committed Nov 17, 2021
commit 702b903f134b39fb112dcfa41a4ab046900d74cf
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<TargetFrameworks>$(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent)-FreeBSD;$(NetCoreAppCurrent)-Linux;$(NetCoreAppCurrent);$(NetCoreAppCurrent)-OSX;$(NetCoreAppCurrent)-iOS;$(NetCoreAppCurrent)-tvOS</TargetFrameworks>
<Nullable>enable</Nullable>
<!-- Suppress unused field warnings when using PlatformNotSupportedException stubs -->
<NoWarn Condition=" '$(TargetsFreeBSD)' == 'true' or '$(TargetsUnknownUnix)' == 'true' or '$(TargetsiOS)' == 'true' or '$(TargetstvOS)' == 'true' ">$(NoWarn);0649</NoWarn>
<NoWarn Condition=" '$(TargetsFreeBSD)' == 'true' or '$(TargetsUnknownUnix)' == 'true'">$(NoWarn);0649</NoWarn>
</PropertyGroup>
<PropertyGroup>
<GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetsAnyOS)' == 'true'">SR.Process_PlatformNotSupported</GeneratePlatformNotSupportedAssemblyMessage>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,14 @@ namespace System.Diagnostics
/// <internalonly/>
internal sealed class ThreadInfo
{
#pragma warning disable CS0649 // The fields are unused on iOS/tvOS as the respective managed logic (mostly around libproc) is excluded.
internal ulong _threadId;
internal int _processId;
internal int _basePriority;
internal int _currentPriority;
internal IntPtr _startAddress;
internal ThreadState _threadState;
internal ThreadWaitReason _threadWaitReason;
#pragma warning restore CS0649
}
}