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/binder/Parcel.h b/include/binder/Parcel.h
index bd58568..98b9835 100644
--- a/include/binder/Parcel.h
+++ b/include/binder/Parcel.h
@@ -477,7 +477,7 @@
class FlattenableHelper : public FlattenableHelperInterface {
friend class Parcel;
const Flattenable<T>& val;
- explicit FlattenableHelper(const Flattenable<T>& val) : val(val) { }
+ explicit FlattenableHelper(const Flattenable<T>& _val) : val(_val) { }
public:
virtual size_t getFlattenedSize() const {
diff --git a/include/gui/IGraphicBufferProducer.h b/include/gui/IGraphicBufferProducer.h
index 40579c2..9bf284b 100644
--- a/include/gui/IGraphicBufferProducer.h
+++ b/include/gui/IGraphicBufferProducer.h
@@ -303,12 +303,13 @@
// set this to Fence::NO_FENCE if the buffer is ready immediately
// sticky - the sticky transform set in Surface (only used by the LEGACY
// camera mode).
- inline QueueBufferInput(int64_t timestamp, bool isAutoTimestamp,
- android_dataspace dataSpace, const Rect& crop, int scalingMode,
- uint32_t transform, const sp<Fence>& fence, uint32_t sticky = 0)
- : timestamp(timestamp), isAutoTimestamp(isAutoTimestamp),
- dataSpace(dataSpace), crop(crop), scalingMode(scalingMode),
- transform(transform), stickyTransform(sticky), fence(fence),
+ inline QueueBufferInput(int64_t _timestamp, bool _isAutoTimestamp,
+ android_dataspace _dataSpace, const Rect& _crop,
+ int _scalingMode, uint32_t _transform, const sp<Fence>& _fence,
+ uint32_t _sticky = 0)
+ : timestamp(_timestamp), isAutoTimestamp(_isAutoTimestamp),
+ dataSpace(_dataSpace), crop(_crop), scalingMode(_scalingMode),
+ transform(_transform), stickyTransform(_sticky), fence(_fence),
surfaceDamage() { }
inline void deflate(int64_t* outTimestamp, bool* outIsAutoTimestamp,
android_dataspace* outDataSpace,
diff --git a/include/private/ui/RegionHelper.h b/include/private/ui/RegionHelper.h
index 83b05c7..c7c3160 100644
--- a/include/private/ui/RegionHelper.h
+++ b/include/private/ui/RegionHelper.h
@@ -53,10 +53,10 @@
TYPE dy;
inline region(const region& rhs)
: rects(rhs.rects), count(rhs.count), dx(rhs.dx), dy(rhs.dy) { }
- inline region(RECT const* r, size_t c)
- : rects(r), count(c), dx(), dy() { }
- inline region(RECT const* r, size_t c, TYPE dx, TYPE dy)
- : rects(r), count(c), dx(dx), dy(dy) { }
+ inline region(RECT const* _r, size_t _c)
+ : rects(_r), count(_c), dx(), dy() { }
+ inline region(RECT const* _r, size_t _c, TYPE _dx, TYPE _dy)
+ : rects(_r), count(_c), dx(_dx), dy(_dy) { }
};
class region_rasterizer {
@@ -79,8 +79,8 @@
spannerInner.prepare(inside);
do {
TYPE left, right;
- int inside = spannerInner.next(current.left, current.right);
- if ((op_mask >> inside) & 1) {
+ int inner_inside = spannerInner.next(current.left, current.right);
+ if ((op_mask >> inner_inside) & 1) {
if (current.left < current.right &&
current.top < current.bottom) {
rasterizer(current);
@@ -162,8 +162,8 @@
region rhs;
public:
- inline Spanner(const region& lhs, const region& rhs)
- : lhs(lhs), rhs(rhs)
+ inline Spanner(const region& _lhs, const region& _rhs)
+ : lhs(_lhs), rhs(_rhs)
{
if (lhs.count) {
SpannerBase::lhs_head = lhs.rects->top + lhs.dy;
@@ -223,8 +223,8 @@
region rhs;
public:
- inline SpannerInner(const region& lhs, const region& rhs)
- : lhs(lhs), rhs(rhs)
+ inline SpannerInner(const region& _lhs, const region& _rhs)
+ : lhs(_lhs), rhs(_rhs)
{
}
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 {