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/libs/gui/SurfaceComposerClient.cpp b/libs/gui/SurfaceComposerClient.cpp
index 6ad47d8..9167a0c 100644
--- a/libs/gui/SurfaceComposerClient.cpp
+++ b/libs/gui/SurfaceComposerClient.cpp
@@ -310,9 +310,9 @@
layer_state_t* s = getLayerStateLocked(client, id);
if (!s)
return BAD_INDEX;
- if (mask & layer_state_t::eLayerOpaque ||
- mask & layer_state_t::eLayerHidden ||
- mask & layer_state_t::eLayerSecure) {
+ if ((mask & layer_state_t::eLayerOpaque) ||
+ (mask & layer_state_t::eLayerHidden) ||
+ (mask & layer_state_t::eLayerSecure)) {
s->what |= layer_state_t::eFlagsChanged;
}
s->flags &= ~mask;