squid:S1854 - Dead stores should be removed (#253)

This commit is contained in:
Mohamed Ezzat 2016-04-18 13:40:26 +02:00 committed by inorichi
parent 55de2b7d97
commit 06681a3db7

View file

@ -860,7 +860,7 @@ public class VerticalViewPagerImpl extends ViewGroup {
final float distance = halfHeight + halfHeight *
distanceInfluenceForSnapDuration(distanceRatio);
int duration = 0;
int duration;
velocity = Math.abs(velocity);
if (velocity > 0) {
duration = 4 * Math.round(1000 * Math.abs(distance / velocity));
@ -1017,7 +1017,7 @@ public class VerticalViewPagerImpl extends ViewGroup {
}
// Locate the currently focused item or add it if needed.
int curIndex = -1;
int curIndex;
ItemInfo curItem = null;
for (curIndex = 0; curIndex < mItems.size(); curIndex++) {
final ItemInfo ii = mItems.get(curIndex);
@ -1177,7 +1177,7 @@ public class VerticalViewPagerImpl extends ViewGroup {
// Base offsets off of oldCurInfo.
if (oldCurPosition < curItem.position) {
int itemIndex = 0;
ItemInfo ii = null;
ItemInfo ii;
float offset = oldCurInfo.offset + oldCurInfo.heightFactor + marginOffset;
for (int pos = oldCurPosition + 1;
pos <= curItem.position && itemIndex < mItems.size(); pos++) {
@ -1197,7 +1197,7 @@ public class VerticalViewPagerImpl extends ViewGroup {
}
} else if (oldCurPosition > curItem.position) {
int itemIndex = mItems.size() - 1;
ItemInfo ii = null;
ItemInfo ii;
float offset = oldCurInfo.offset;
for (int pos = oldCurPosition - 1;
pos >= curItem.position && itemIndex >= 0; pos--) {
@ -1561,8 +1561,8 @@ public class VerticalViewPagerImpl extends ViewGroup {
final View child = getChildAt(i);
if (child.getVisibility() != GONE) {
final LayoutParams lp = (LayoutParams) child.getLayoutParams();
int childLeft = 0;
int childTop = 0;
int childLeft;
int childTop;
if (lp.isDecor) {
final int hgrav = lp.gravity & Gravity.HORIZONTAL_GRAVITY_MASK;
final int vgrav = lp.gravity & Gravity.VERTICAL_GRAVITY_MASK;
@ -1731,7 +1731,7 @@ public class VerticalViewPagerImpl extends ViewGroup {
if (!lp.isDecor) continue;
final int vgrav = lp.gravity & Gravity.VERTICAL_GRAVITY_MASK;
int childTop = 0;
int childTop;
switch (vgrav) {
default:
childTop = paddingTop;