Fix constructor parameters shadowing member variables
Using the same name for the constructor parameter and the member
variable causes a warning that was being hidden by the use of -isystem
to include frameworks/native/include. Prefix the parameter with an
underscore.
Bug: 31752268
Test: m -j
Change-Id: I7748934f1e9515176e2ae98d2c0e58d165a7a5c2
diff --git a/include/ui/Gralloc1On0Adapter.h b/include/ui/Gralloc1On0Adapter.h
index 191377c..8beb281 100644
--- a/include/ui/Gralloc1On0Adapter.h
+++ b/include/ui/Gralloc1On0Adapter.h
@@ -124,10 +124,10 @@
// Buffer descriptor modification functions
struct Descriptor : public std::enable_shared_from_this<Descriptor> {
- Descriptor(Gralloc1On0Adapter* adapter,
- gralloc1_buffer_descriptor_t id)
- : adapter(adapter),
- id(id),
+ Descriptor(Gralloc1On0Adapter* _adapter,
+ gralloc1_buffer_descriptor_t _id)
+ : adapter(_adapter),
+ id(_id),
width(0),
height(0),
format(HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED),
diff --git a/include/ui/Point.h b/include/ui/Point.h
index 1d7f64d..d050ede 100644
--- a/include/ui/Point.h
+++ b/include/ui/Point.h
@@ -34,7 +34,7 @@
// Default constructor doesn't initialize the Point
inline Point() {
}
- inline Point(int x, int y) : x(x), y(y) {
+ inline Point(int _x, int _y) : x(_x), y(_y) {
}
inline bool operator == (const Point& rhs) const {