d/ulv2: fix maybe uninitialized warning

../src/xrt/drivers/ultraleap_v2/ulv2_driver.cpp: In function 'void* leap_input_loop(void*)':
../src/xrt/drivers/ultraleap_v2/ulv2_driver.cpp:290:29: warning: 'hi' may be used uninitialized in this function [-Wmaybe-uninitialized]
  290 |                         int hi; // hand index
      |                             ^~
This commit is contained in:
Christoph Haag 2021-07-15 01:35:49 +02:00
parent ab209bcf18
commit be0b4f496a

View file

@ -296,12 +296,13 @@ leap_input_loop(void *ptr_to_xdev)
continue; // in case there are more than one left hand
leftbeendone = true;
hi = 0;
}
if (!hand.isLeft()) {
} else if (hand.isRight()) {
if (rightbeendone)
continue; // in case there are more than one right hand
rightbeendone = true;
hi = 1;
} else {
continue;
}
ulv2_process_hand(hand, &ulv2d->joints_write_in[hi], hi);