OSDN Git Service

Fix a use-of-uninitialized-value warning.
authorGeorge Burgess IV <gbiv@google.com>
Tue, 24 Jan 2017 23:48:28 +0000 (15:48 -0800)
committerGeorge Burgess IV <gbiv@google.com>
Tue, 24 Jan 2017 23:48:28 +0000 (15:48 -0800)
commit2df0c67152cbf24ced14a963bb935484f424b167
tree11bfd7f27a00cd210dc650cdd7208cdbdf70e5f1
parent01f2e676481cf434a390029e361f77357e47d61f
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
core/jni/android_hardware_SoundTrigger.cpp