diff --git a/dlib/test/bsp.cpp b/dlib/test/bsp.cpp index 29d31b2c5..04367c1d3 100644 --- a/dlib/test/bsp.cpp +++ b/dlib/test/bsp.cpp @@ -481,7 +481,7 @@ namespace const double width = right-left; matrix values_to_check = linspace(left +l*width, left + r*width, 100); - double best_x; + double best_x = 0; double best_val = std::numeric_limits::infinity(); for (long j = 0; j < values_to_check.size(); ++j) {