Fix warnings, enable warningsAsErrors
This commit is contained in:
parent
247c46da1c
commit
dfac28da89
|
|
@ -45,8 +45,8 @@ namespace TestClient
|
||||||
}
|
}
|
||||||
|
|
||||||
// RunWebSocketClient().Wait();
|
// RunWebSocketClient().Wait();
|
||||||
Console.WriteLine("Done");
|
// Console.WriteLine("Done");
|
||||||
Console.ReadKey();
|
// Console.ReadKey();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static async Task RunWebSocketClient()
|
public static async Task RunWebSocketClient()
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@
|
||||||
},
|
},
|
||||||
"compilationOptions": {
|
"compilationOptions": {
|
||||||
"allowUnsafe": true,
|
"allowUnsafe": true,
|
||||||
|
"warningsAsErrors": true,
|
||||||
"keyFile": "../../tools/Key.snk"
|
"keyFile": "../../tools/Key.snk"
|
||||||
},
|
},
|
||||||
"frameworks": {
|
"frameworks": {
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,6 @@ namespace System.Threading
|
||||||
{
|
{
|
||||||
internal readonly ThreadPoolBoundHandleOverlapped _overlapped;
|
internal readonly ThreadPoolBoundHandleOverlapped _overlapped;
|
||||||
private DeferredDisposableLifetime<PreAllocatedOverlapped> _lifetime;
|
private DeferredDisposableLifetime<PreAllocatedOverlapped> _lifetime;
|
||||||
[CLSCompliant(false)]
|
|
||||||
public PreAllocatedOverlapped(IOCompletionCallback callback, object state, object pinData)
|
public PreAllocatedOverlapped(IOCompletionCallback callback, object state, object pinData)
|
||||||
{
|
{
|
||||||
if (callback == null)
|
if (callback == null)
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@ namespace System.Threading
|
||||||
}
|
}
|
||||||
return new ThreadPoolBoundHandle(handle);
|
return new ThreadPoolBoundHandle(handle);
|
||||||
}
|
}
|
||||||
[CLSCompliant(false)]
|
|
||||||
public unsafe NativeOverlapped* AllocateNativeOverlapped(IOCompletionCallback callback, object state, object pinData)
|
public unsafe NativeOverlapped* AllocateNativeOverlapped(IOCompletionCallback callback, object state, object pinData)
|
||||||
{
|
{
|
||||||
if (callback == null)
|
if (callback == null)
|
||||||
|
|
@ -59,7 +59,7 @@ namespace System.Threading
|
||||||
_boundHandle = this
|
_boundHandle = this
|
||||||
}._nativeOverlapped;
|
}._nativeOverlapped;
|
||||||
}
|
}
|
||||||
[CLSCompliant(false)]
|
|
||||||
public unsafe NativeOverlapped* AllocateNativeOverlapped(PreAllocatedOverlapped preAllocated)
|
public unsafe NativeOverlapped* AllocateNativeOverlapped(PreAllocatedOverlapped preAllocated)
|
||||||
{
|
{
|
||||||
if (preAllocated == null)
|
if (preAllocated == null)
|
||||||
|
|
@ -86,7 +86,7 @@ namespace System.Threading
|
||||||
}
|
}
|
||||||
return nativeOverlapped;
|
return nativeOverlapped;
|
||||||
}
|
}
|
||||||
[CLSCompliant(false)]
|
|
||||||
public unsafe void FreeNativeOverlapped(NativeOverlapped* overlapped)
|
public unsafe void FreeNativeOverlapped(NativeOverlapped* overlapped)
|
||||||
{
|
{
|
||||||
if (overlapped == null)
|
if (overlapped == null)
|
||||||
|
|
@ -105,7 +105,7 @@ namespace System.Threading
|
||||||
}
|
}
|
||||||
Overlapped.Free(overlapped);
|
Overlapped.Free(overlapped);
|
||||||
}
|
}
|
||||||
[CLSCompliant(false)]
|
|
||||||
public unsafe static object GetNativeOverlappedState(NativeOverlapped* overlapped)
|
public unsafe static object GetNativeOverlappedState(NativeOverlapped* overlapped)
|
||||||
{
|
{
|
||||||
if (overlapped == null)
|
if (overlapped == null)
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@
|
||||||
},
|
},
|
||||||
"compilationOptions": {
|
"compilationOptions": {
|
||||||
"allowUnsafe": true,
|
"allowUnsafe": true,
|
||||||
|
"warningsAsErrors": true,
|
||||||
"keyFile": "../../tools/Key.snk"
|
"keyFile": "../../tools/Key.snk"
|
||||||
},
|
},
|
||||||
"frameworks": {
|
"frameworks": {
|
||||||
|
|
|
||||||
|
|
@ -66,7 +66,7 @@ namespace Microsoft.Net.WebSockets
|
||||||
private readonly ArraySegment<byte> _PropertyBuffer;
|
private readonly ArraySegment<byte> _PropertyBuffer;
|
||||||
private readonly int _SendBufferSize;
|
private readonly int _SendBufferSize;
|
||||||
private volatile int _PayloadOffset;
|
private volatile int _PayloadOffset;
|
||||||
private volatile WebSocketReceiveResult _BufferedPayloadReceiveResult;
|
private WebSocketReceiveResult _BufferedPayloadReceiveResult;
|
||||||
private long _PinnedSendBufferStartAddress;
|
private long _PinnedSendBufferStartAddress;
|
||||||
private long _PinnedSendBufferEndAddress;
|
private long _PinnedSendBufferEndAddress;
|
||||||
private ArraySegment<byte> _PinnedSendBuffer;
|
private ArraySegment<byte> _PinnedSendBuffer;
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@
|
||||||
},
|
},
|
||||||
"compilationOptions": {
|
"compilationOptions": {
|
||||||
"allowUnsafe": true,
|
"allowUnsafe": true,
|
||||||
|
"warningsAsErrors": true,
|
||||||
"keyFile": "../../tools/Key.snk"
|
"keyFile": "../../tools/Key.snk"
|
||||||
},
|
},
|
||||||
"frameworks": {
|
"frameworks": {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue