mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-02-03 12:28:07 +00:00
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:
parent
ab209bcf18
commit
be0b4f496a
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue