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/DisplayHardware/FloatRect.h b/services/surfaceflinger/DisplayHardware/FloatRect.h
index b08a951..3b75cc0 100644
--- a/services/surfaceflinger/DisplayHardware/FloatRect.h
+++ b/services/surfaceflinger/DisplayHardware/FloatRect.h
@@ -29,7 +29,8 @@
float right;
float bottom;
- inline FloatRect() { }
+ inline FloatRect()
+ : left(0), top(0), right(0), bottom(0) { }
inline FloatRect(const Rect& other)
: left(other.left), top(other.top), right(other.right), bottom(other.bottom) { }