Browse Source

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;
                  ^
master
Lucas De Marchi 9 years ago
parent
commit
e770cf059d
  1. 2
      APMrover2/test.cpp

2
APMrover2/test.cpp

@ -136,7 +136,7 @@ int8_t Rover::test_radio(uint8_t argc, const Menu::arg *argv) @@ -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);

Loading…
Cancel
Save