Fix use of uninitialized value
This fixes multiple warnings that look like:
packages/apps/LegacyCamera/jni/feature_mos_jni.cpp:371:8: warning:
variable 'ret_code' is used uninitialized whenever '&&' condition is
false
(We only init ret_code in the if block, not the else. It's later
unconditionally assigned to gTRS[10]).
Bug: None
Test: mma. Warning disappeared.
Change-Id: I5993dafa68ca64fd5e467789be0ca747f0805426
diff --git a/jni/feature_mos_jni.cpp b/jni/feature_mos_jni.cpp
index e40b75a..c2dcabf 100644
--- a/jni/feature_mos_jni.cpp
+++ b/jni/feature_mos_jni.cpp
@@ -366,7 +366,7 @@
{
double t0, t1, time_c;
t0 = now_ms();
- int ret_code;
+ int ret_code = 0;
if(frame_number_HR<MAX_FRAMES && frame_number_LR<MAX_FRAMES)
{