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

Skip to content
Commit 2c3ccaed authored by George Burgess IV's avatar George Burgess IV
Browse files

Fix a use-of-uninitialized-value warning

Caught by clang's static analyzer:
frameworks/base/core/jni/com_google_android_gles_jni_GLImpl.cpp:190:30:
warning: The right operand of '+' is a garbage value
            buf = (char*)buf + offset;

This is because getPointer doesn't always set `offset` to a value. We
could fix it locally by initializing `offset`, but it seems to be less
error-prone to just fix getPointer instead.

Bug: None
Test: Still builds; warning is now gone.
Change-Id: I90bea0c94cf8d7f92a0d9a4db4e64e7e563bfb09
parent 9dc2e6bc
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment