Browse Source

Suppress CS0168 (Variable is declared but never used)

pull/574/head
Sam Harwell 5 years ago
parent
commit
98caf797fc
2 changed files with 6 additions and 0 deletions
  1. +4
    -0
      src/TensorFlowNET.Core/Operations/Distributions/distribution.py.cs
  2. +2
    -0
      src/TensorFlowNET.Keras/Model.cs

+ 4
- 0
src/TensorFlowNET.Core/Operations/Distributions/distribution.py.cs View File

@@ -64,12 +64,16 @@ namespace Tensorflow
{
return _log_prob(value);
}
#pragma warning disable CS0168 // Variable is declared but never used
catch (Exception e1)
#pragma warning restore CS0168 // Variable is declared but never used
{
try
{
return math_ops.log(_prob(value));
#pragma warning disable CS0168 // Variable is declared but never used
} catch (Exception e2)
#pragma warning restore CS0168 // Variable is declared but never used
{
throw new NotImplementedException();
}


+ 2
- 0
src/TensorFlowNET.Keras/Model.cs View File

@@ -50,7 +50,9 @@ namespace Tensorflow.Keras
{
return Flow;
}
#pragma warning disable CS0168 // Variable is declared but never used
catch (Exception ex)
#pragma warning restore CS0168 // Variable is declared but never used
{
return null;
}


Loading…
Cancel
Save