Adjust unused local variables to also make FindBugs happy

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1753124 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Dominik Stadler 2016-07-17 21:18:19 +00:00
parent da9cd94e76
commit 29b21a82f7
4 changed files with 7 additions and 15 deletions

View File

@ -84,8 +84,6 @@ public class HwmfBitmap16 {
} }
public BufferedImage getImage() { public BufferedImage getImage() {
BufferedImage bi = new BufferedImage(width, height, BufferedImage.TYPE_4BYTE_ABGR); return new BufferedImage(width, height, BufferedImage.TYPE_4BYTE_ABGR);
return bi;
} }
} }

View File

@ -43,8 +43,7 @@ public class HwmfColorRef implements Cloneable {
int red = leis.readUByte(); int red = leis.readUByte();
int green = leis.readUByte(); int green = leis.readUByte();
int blue = leis.readUByte(); int blue = leis.readUByte();
@SuppressWarnings("unused") /*int reserved =*/ leis.readUByte();
int reserved = leis.readUByte();
colorRef = new Color(red, green, blue); colorRef = new Color(red, green, blue);
return 4*LittleEndianConsts.BYTE_SIZE; return 4*LittleEndianConsts.BYTE_SIZE;

View File

@ -482,8 +482,7 @@ public class HwmfFill {
xSrc = leis.readShort(); xSrc = leis.readShort();
size = 6*LittleEndianConsts.SHORT_SIZE; size = 6*LittleEndianConsts.SHORT_SIZE;
if (!hasBitmap) { if (!hasBitmap) {
@SuppressWarnings("unused") /*int reserved =*/ leis.readShort();
int reserved = leis.readShort();
size += LittleEndianConsts.SHORT_SIZE; size += LittleEndianConsts.SHORT_SIZE;
} }
destHeight = leis.readShort(); destHeight = leis.readShort();
@ -685,8 +684,7 @@ public class HwmfFill {
size = 4*LittleEndianConsts.SHORT_SIZE; size = 4*LittleEndianConsts.SHORT_SIZE;
if (!hasBitmap) { if (!hasBitmap) {
@SuppressWarnings("unused") /*int reserved =*/ leis.readShort();
int reserved = leis.readShort();
size += LittleEndianConsts.SHORT_SIZE; size += LittleEndianConsts.SHORT_SIZE;
} }
@ -872,8 +870,7 @@ public class HwmfFill {
xSrc = leis.readShort(); xSrc = leis.readShort();
size = 4*LittleEndianConsts.SHORT_SIZE; size = 4*LittleEndianConsts.SHORT_SIZE;
if (!hasBitmap) { if (!hasBitmap) {
@SuppressWarnings("unused") /*int reserved =*/ leis.readShort();
int reserved = leis.readShort();
size += LittleEndianConsts.SHORT_SIZE; size += LittleEndianConsts.SHORT_SIZE;
} }
height = leis.readShort(); height = leis.readShort();
@ -979,8 +976,7 @@ public class HwmfFill {
xSrc = leis.readShort(); xSrc = leis.readShort();
size = 6*LittleEndianConsts.SHORT_SIZE; size = 6*LittleEndianConsts.SHORT_SIZE;
if (!hasBitmap) { if (!hasBitmap) {
@SuppressWarnings("unused") /*int reserved =*/ leis.readShort();
int reserved = leis.readShort();
size += LittleEndianConsts.SHORT_SIZE; size += LittleEndianConsts.SHORT_SIZE;
} }
destHeight = leis.readShort(); destHeight = leis.readShort();

View File

@ -184,12 +184,11 @@ public class HwmfMisc {
return HwmfRecordType.setLayout; return HwmfRecordType.setLayout;
} }
@SuppressWarnings("unused")
@Override @Override
public int init(LittleEndianInputStream leis, long recordSize, int recordFunction) throws IOException { public int init(LittleEndianInputStream leis, long recordSize, int recordFunction) throws IOException {
layout = leis.readUShort(); layout = leis.readUShort();
// A 16-bit field that MUST be ignored. // A 16-bit field that MUST be ignored.
int reserved = leis.readShort(); /*int reserved =*/ leis.readShort();
return 2*LittleEndianConsts.SHORT_SIZE; return 2*LittleEndianConsts.SHORT_SIZE;
} }