summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTreeHugger Robot <treehugger-gerrit@google.com>2018-11-01 16:48:54 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2018-11-01 16:48:54 +0000
commit0af0a2c579c8368291c8d2b78a84e353442bf010 (patch)
treec1c7327c76faf8e0cb1915434db3ab446d2c2c06
parent53726cf136bd1a63408bc9c59880f67f32d59dba (diff)
parentd2b525e7650e9f81dfaa14656866318c45d0b765 (diff)
downloaddevice_generic_opengl-transport-0af0a2c579c8368291c8d2b78a84e353442bf010.tar.gz
device_generic_opengl-transport-0af0a2c579c8368291c8d2b78a84e353442bf010.tar.bz2
device_generic_opengl-transport-0af0a2c579c8368291c8d2b78a84e353442bf010.zip
Merge "Silence a static analyzer warning"
-rw-r--r--host/libs/virglrenderer/AVDVirglRenderer.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/host/libs/virglrenderer/AVDVirglRenderer.cpp b/host/libs/virglrenderer/AVDVirglRenderer.cpp
index 95e725600..973e14442 100644
--- a/host/libs/virglrenderer/AVDVirglRenderer.cpp
+++ b/host/libs/virglrenderer/AVDVirglRenderer.cpp
@@ -340,6 +340,14 @@ int virgl_renderer_init(void* cookie, int flags, virgl_renderer_callbacks* cb) {
g_dpy = EGL_NO_DISPLAY;
return ENOENT;
}
+
+ // Our static analyzer sees the `new`ing of `config` below without any sort
+ // of attempt to free it, and warns about it. Normally, it would catch that
+ // we're pushing it into a vector in the constructor, but it hits an
+ // internal evaluation limit when trying to evaluate the loop inside of the
+ // ctor. So, it never gets to see that we escape our newly-allocated
+ // `config` instance. Silence the warning, since it's incorrect.
+ // NOLINTNEXTLINE(clang-analyzer-cplusplus.NewDeleteLeaks)
for (EGLint c = 0; c < nConfigs; c++) {
EGLint configId;
if (!s_egl.eglGetConfigAttrib(g_dpy, configs[c], EGL_CONFIG_ID, &configId)) {