Fix issues caught by -Wtautological-constant-compare

This fixes a check that is always evaluates to true.  The check expression is a
conditional operator that returns 1 or 2, both of which convert to true.  This
fix puts in the enum value that causes the check to pass.

PiperOrigin-RevId: 317391929
Change-Id: I12f3f9b06f494b4bcf0e4ff194d4dc4edafd52e2
This commit is contained in:
A. Unique TensorFlower 2020-06-19 15:30:49 -07:00 committed by TensorFlower Gardener
parent 90443c2b17
commit fb5a3c3c6a

View File

@ -667,7 +667,7 @@ void GraphTransferer::RegisterNodeWithPaddingAndStrides(
<< "Op " << node.type_string() << " not found in map(id = " << op_type_id
<< ")";
// Safety check of padding id
CHECK(padding == Padding::VALID ? 1 : 2);
CHECK(padding == Padding::SAME);
AppendNodeParamsWithIoParams(
shape_refiner, node, node.name(), id, node.type_string(), op_type_id,
static_cast<int>(padding), node.num_inputs(), extra_inputs,