libgui/SF: Fix some code warnings
A couple of fixes to satisfy the Eclipse static code analysis tool.
- Initialize all members in constructors
- Remove unused forward declarations
- Add parentheses when combining logical and bitwise operators
- Fix a case statement with no break (it was intentional)
Change-Id: Icecb8cc98c6f58b97ab33fffb621f0edc33a7d3c
diff --git a/services/surfaceflinger/RenderEngine/RenderEngine.cpp b/services/surfaceflinger/RenderEngine/RenderEngine.cpp
index 7cd42e4..27357b9 100644
--- a/services/surfaceflinger/RenderEngine/RenderEngine.cpp
+++ b/services/surfaceflinger/RenderEngine/RenderEngine.cpp
@@ -148,7 +148,7 @@
return engine;
}
-RenderEngine::RenderEngine() : mEGLContext(EGL_NO_CONTEXT) {
+RenderEngine::RenderEngine() : mEGLConfig(NULL), mEGLContext(EGL_NO_CONTEXT) {
}
RenderEngine::~RenderEngine() {
@@ -316,7 +316,7 @@
friend class Adder;
KeyedVector<Attribute, EGLint> mList;
struct Attribute {
- Attribute() {};
+ Attribute() : v(0) {};
Attribute(EGLint v) : v(v) { }
EGLint v;
bool operator < (const Attribute& other) const {