Repository: incubator-reef
Updated Branches:
  refs/heads/master 67510311a -> 13350af63


[REEF-629] Treat warnings as errors in REEF.NET build

This addressed the issue by
 * Treating warnings as errors
 * Treating Obsolete attribute warnings (612 & 618) as warnings
 * Fix trivial warnings to make the build work

JIRA:
 [REEF-629](https://issues.apache.org/jira/browse/REEF-629)

Pull Request:
  This closes #424


Project: http://git-wip-us.apache.org/repos/asf/incubator-reef/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-reef/commit/13350af6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-reef/tree/13350af6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-reef/diff/13350af6

Branch: refs/heads/master
Commit: 13350af6357b0b36b9fcf9c9467deaa5e83db9d7
Parents: 6751031
Author: Anupam <[email protected]>
Authored: Wed Aug 26 18:40:37 2015 -0700
Committer: Markus Weimer <[email protected]>
Committed: Thu Aug 27 08:55:59 2015 -0700

----------------------------------------------------------------------
 lang/cs/Org.Apache.REEF.IMRU/OnREEF/Driver/IMRUDriver.cs         | 4 ++--
 .../GroupCommunication/GroupCommuDriverTests.cs                  | 2 --
 .../NetworkService/Codec/NsMessageStreamingCodec.cs              | 2 +-
 lang/cs/build.props                                              | 4 ++++
 4 files changed, 7 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/13350af6/lang/cs/Org.Apache.REEF.IMRU/OnREEF/Driver/IMRUDriver.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.IMRU/OnREEF/Driver/IMRUDriver.cs 
b/lang/cs/Org.Apache.REEF.IMRU/OnREEF/Driver/IMRUDriver.cs
index 026563c..2d8bad5 100644
--- a/lang/cs/Org.Apache.REEF.IMRU/OnREEF/Driver/IMRUDriver.cs
+++ b/lang/cs/Org.Apache.REEF.IMRU/OnREEF/Driver/IMRUDriver.cs
@@ -292,7 +292,7 @@ namespace Org.Apache.REEF.IMRU.OnREEF.Driver
                             
GenericType<MapInputwithControlMessagePipelineDataConverter<TMapInput>>.Class)
                         .Build();
             }
-            catch (Exception e)
+            catch (Exception)
             {
                 mapInputPipelineDataConverterConfig = TangFactory.GetTang()
                     .NewConfigurationBuilder()
@@ -308,7 +308,7 @@ namespace Org.Apache.REEF.IMRU.OnREEF.Driver
                     .NewInjector(mapInputPipelineDataConverterConfig)
                     .GetInstance<IPipelineDataConverter<TMapOutput>>();
             }
-            catch (Exception e)
+            catch (Exception)
             {
                 mapOutputPipelineDataConverterConfig =
                     TangFactory.GetTang()

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/13350af6/lang/cs/Org.Apache.REEF.Network.Tests/GroupCommunication/GroupCommuDriverTests.cs
----------------------------------------------------------------------
diff --git 
a/lang/cs/Org.Apache.REEF.Network.Tests/GroupCommunication/GroupCommuDriverTests.cs
 
b/lang/cs/Org.Apache.REEF.Network.Tests/GroupCommunication/GroupCommuDriverTests.cs
index b02f8d5..3c145c7 100644
--- 
a/lang/cs/Org.Apache.REEF.Network.Tests/GroupCommunication/GroupCommuDriverTests.cs
+++ 
b/lang/cs/Org.Apache.REEF.Network.Tests/GroupCommunication/GroupCommuDriverTests.cs
@@ -37,8 +37,6 @@ namespace Org.Apache.REEF.Network.Tests.GroupCommunication
         public void TestServiceConfiguration()
         {
             string groupName = "group1";
-            string broadcastOperatorName = "broadcast";
-            string reduceOperatorName = "reduce";
             string masterTaskId = "task0";
             string driverId = "Driver Id";
             int numTasks = 3;

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/13350af6/lang/cs/Org.Apache.REEF.Network/NetworkService/Codec/NsMessageStreamingCodec.cs
----------------------------------------------------------------------
diff --git 
a/lang/cs/Org.Apache.REEF.Network/NetworkService/Codec/NsMessageStreamingCodec.cs
 
b/lang/cs/Org.Apache.REEF.Network/NetworkService/Codec/NsMessageStreamingCodec.cs
index c30c1bd..1ac4e14 100644
--- 
a/lang/cs/Org.Apache.REEF.Network/NetworkService/Codec/NsMessageStreamingCodec.cs
+++ 
b/lang/cs/Org.Apache.REEF.Network/NetworkService/Codec/NsMessageStreamingCodec.cs
@@ -143,7 +143,7 @@ namespace Org.Apache.REEF.Network.NetworkService.Codec
             foreach (var data in obj.Data)
             {
                 var asyncResult = codecWriteFunc.BeginInvoke(data, writer, 
token, null, null);
-                codecWriteFunc.EndInvoke(asyncResult);
+                await codecWriteFunc.EndInvoke(asyncResult);
             }
         }
 

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/13350af6/lang/cs/build.props
----------------------------------------------------------------------
diff --git a/lang/cs/build.props b/lang/cs/build.props
index b9ffbe1..f817e9c 100644
--- a/lang/cs/build.props
+++ b/lang/cs/build.props
@@ -37,6 +37,8 @@ under the License.
     <DefineConstants>DEBUG;TRACE</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
+    <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
+    <WarningsNotAsErrors>612,618</WarningsNotAsErrors>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
     <BuildPackage>true</BuildPackage>
@@ -48,6 +50,8 @@ under the License.
     <DefineConstants>TRACE</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
+    <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
+    <WarningsNotAsErrors>612,618</WarningsNotAsErrors>
   </PropertyGroup>
 
   <!-- REEF NuGet properties -->

Reply via email to