Skip to content

Commit 09f1af5

Browse files
sharwellOceania2018
authored andcommitted
Suppress CS0168 (Variable is declared but never used)
1 parent fe62586 commit 09f1af5

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

‎src/TensorFlowNET.Core/Operations/Distributions/distribution.py.cs‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,16 @@ private Tensor _call_log_prob (Tensor value, string name)
6464
{
6565
return _log_prob(value);
6666
}
67+
#pragma warning disable CS0168 // Variable is declared but never used
6768
catch (Exception e1)
69+
#pragma warning restore CS0168 // Variable is declared but never used
6870
{
6971
try
7072
{
7173
return math_ops.log(_prob(value));
74+
#pragma warning disable CS0168 // Variable is declared but never used
7275
} catch (Exception e2)
76+
#pragma warning restore CS0168 // Variable is declared but never used
7377
{
7478
throw new NotImplementedException();
7579
}

‎src/TensorFlowNET.Keras/Model.cs‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,9 @@ public Tensor getFlow()
5050
{
5151
return Flow;
5252
}
53+
#pragma warning disable CS0168 // Variable is declared but never used
5354
catch (Exception ex)
55+
#pragma warning restore CS0168 // Variable is declared but never used
5456
{
5557
return null;
5658
}

0 commit comments

Comments
 (0)