APMRover2: initialize variable to fix build

Fix the following build error on clang:

../../APMrover2/test.cpp:164:4: fatal error: variable 'fail_test' is uninitialized when used here [-Wuninitialized]
   fail_test++;
   ^~~~~~~~~
../../APMrover2/test.cpp:139:19: note: initialize the variable 'fail_test' to silence this warning
 uint8_t fail_test;
                  ^
This commit is contained in:
Lucas De Marchi 2016-03-01 10:25:28 -03:00
parent 2888bdd6d5
commit e770cf059d

View File

@ -136,7 +136,7 @@ int8_t Rover::test_radio(uint8_t argc, const Menu::arg *argv)
int8_t Rover::test_failsafe(uint8_t argc, const Menu::arg *argv)
{
uint8_t fail_test;
uint8_t fail_test = 0;
print_hit_enter();
for(int i = 0; i < 50; i++){
delay(20);