Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f3c417cf authored by George Burgess IV's avatar George Burgess IV Committed by Arne Coucheron
Browse files

Fix a use-of-uninitialized-value warning.

Caught by clang's static analyzer:
frameworks/base/core/jni/android_hardware_SoundTrigger.cpp:660:20:
warning: Assigned value is garbage or undefined
        nHandle[0] = (jint)handle;

Given that we return an error code anyway, we can just set it to 0 and
move on.

Bug: None
Test: Still builds; static analyzer doesn't complain.
Change-Id: I9a5be562a0d96fd6c48bb98eca0867fc754bba63
parent 05bdf559
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -509,7 +509,7 @@ android_hardware_SoundTrigger_loadSoundModel(JNIEnv *env, jobject thiz,
    sp<MemoryDealer> memoryDealer;
    sp<IMemory> memory;
    size_t size;
    sound_model_handle_t handle;
    sound_model_handle_t handle = 0;
    jobject jUuid;
    jstring jUuidString;
    const char *nUuidString;