Imath
Imath copied to clipboard
check return status of extractSHRT() in testMatrix()
testMatrix() in testExtractSHRT.cpp fails to check the return status of extractSHRT(). If the input matrix is invalid, it will produce garbage results. A better solution is to assert that extractSHRT() returns true.
Adding this assert will eliminate an uninitialized variable reference warning, since the s, h, r, and t variables may be unset.