Silenced a false-positive warning from the LLVM Static Analyzer with initialization.

The warning is caused because the code has a series of if statements not chained with else clauses -- code that works as-is, but scares the SA.  Probably not worth the effort to refactor...the optimizing compiler probably removes a temporary variable.
This commit is contained in:
Donald Alan Morrison 2012-08-20 18:30:12 -07:00
parent 7d66f62881
commit 81d8dd0eb2
1 changed files with 1 additions and 2 deletions

View File

@ -119,8 +119,7 @@ void calculate_line_normal(kmVec2 p1, kmVec2 p2, kmVec2* normal_out) {
kmBool kmRay2IntersectTriangle(const kmRay2* ray, const kmVec2* p1, const kmVec2* p2, const kmVec2* p3, kmVec2* intersection, kmVec2* normal_out) {
kmVec2 intersect;
kmVec2 final_intersect;
kmVec2 normal;
kmVec2 final_intersect = {.x = 0, .y = 0}, normal = {.x = 0, .y = 0}; // Silencing LLVM SA
kmScalar distance = 10000.0f;
kmBool intersected = KM_FALSE;