The open source OpenXR runtime
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

u/aeg: Fix clang warnings

+4 -4
+4 -4
src/xrt/auxiliary/util/u_autoexpgain.c
··· 46 46 //! AEG State machine states 47 47 enum u_aeg_state 48 48 { 49 - IDLE, 49 + IDLE = 0, 50 50 BRIGHTEN, 51 51 STOP_BRIGHTEN, //!< Avoid oscillations by 52 52 DARKEN, ··· 56 56 //! This actions are triggered when the image is too dark, bright or good enough 57 57 enum u_aeg_action 58 58 { 59 - GOOD, 59 + GOOD = 0, 60 60 DARK, 61 61 BRIGHT, 62 62 }; ··· 161 161 static void 162 162 set_state(struct u_autoexpgain *aeg, enum u_aeg_action action) 163 163 { 164 - enum u_aeg_state new_state; 164 + enum u_aeg_state new_state = -1; 165 165 if (aeg->state == IDLE) { 166 166 if (action == DARK) { 167 167 new_state = BRIGHTEN; ··· 383 383 return; 384 384 } 385 385 386 - float target_score; 386 + float target_score = 0; 387 387 if (aeg->strategy == U_AEG_STRATEGY_TRACKING) { 388 388 target_score = -aeg->threshold; // Makes 0 the right bound of our "good enugh" range 389 389 } else if (aeg->strategy == U_AEG_STRATEGY_DYNAMIC_RANGE) {