aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/csharp/Grpc.Core
diff options
context:
space:
mode:
authorGravatar Jan Tattermusch <jtattermusch@google.com>2017-08-08 17:24:39 +0200
committerGravatar Jan Tattermusch <jtattermusch@google.com>2017-08-11 18:17:18 +0200
commitaa135cedf9dbed32f18621882ed0998a67193c85 (patch)
treec777d00b6b6541954d7585dfaed4c24c0ff53e78 /src/csharp/Grpc.Core
parentca254732298c25acc1b7006c75fb8434dc0f94d1 (diff)
treat warnings as errors
Diffstat (limited to 'src/csharp/Grpc.Core')
-rwxr-xr-xsrc/csharp/Grpc.Core/Grpc.Core.csproj1
-rw-r--r--src/csharp/Grpc.Core/Internal/AuthContextSafeHandle.cs2
2 files changed, 2 insertions, 1 deletions
diff --git a/src/csharp/Grpc.Core/Grpc.Core.csproj b/src/csharp/Grpc.Core/Grpc.Core.csproj
index e32711c520..dde800aadd 100755
--- a/src/csharp/Grpc.Core/Grpc.Core.csproj
+++ b/src/csharp/Grpc.Core/Grpc.Core.csproj
@@ -18,6 +18,7 @@
<IncludeSymbols>true</IncludeSymbols>
<IncludeSource>true</IncludeSource>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
+ <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
<ItemGroup>
diff --git a/src/csharp/Grpc.Core/Internal/AuthContextSafeHandle.cs b/src/csharp/Grpc.Core/Internal/AuthContextSafeHandle.cs
index 6c22bd59ba..f7a6b320a7 100644
--- a/src/csharp/Grpc.Core/Internal/AuthContextSafeHandle.cs
+++ b/src/csharp/Grpc.Core/Internal/AuthContextSafeHandle.cs
@@ -74,7 +74,7 @@ namespace Grpc.Core.Internal
private AuthProperty PtrToAuthProperty(IntPtr authPropertyPtr)
{
- var nativeAuthProperty = (NativeAuthProperty) Marshal.PtrToStructure(authPropertyPtr, typeof(NativeAuthProperty));
+ var nativeAuthProperty = Marshal.PtrToStructure<NativeAuthProperty>(authPropertyPtr);
var name = Marshal.PtrToStringAnsi(nativeAuthProperty.Name);
var valueBytes = new byte[(int) nativeAuthProperty.ValueLength];
Marshal.Copy(nativeAuthProperty.Value, valueBytes, 0, (int)nativeAuthProperty.ValueLength);