amp: Fix Dead Store
Fix dead store (Dead assignement/Dead increment) Warning found by Clang Change-Id: I199d9ebf9ff48f4268a4647bfdeafb784eb8e9a5 Reviewed-on: https://code.wireshark.org/review/34908 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
This commit is contained in:
parent
86b0fe361c
commit
e4692c5226
|
@ -245,19 +245,15 @@ static cborObj cbor_info(tvbuff_t *tvb, int offset)
|
|||
ret.uint = (tmp & 0x1F); // May be actual size or indication of follow-on size
|
||||
} else if (theSize==24) { // next byte is uint8_t data
|
||||
ret.uint = tvb_get_guint8(tvb, offset);
|
||||
offset += 1;
|
||||
ret.size += 1;
|
||||
} else if (theSize==25) { // next 2 bytes are uint16_t data
|
||||
ret.uint = tvb_get_guint16(tvb, offset, 0);
|
||||
offset += 2;
|
||||
ret.size += 2;
|
||||
} else if (theSize==26) { // next 4 bytes are uint32_t data
|
||||
ret.uint = tvb_get_guint32(tvb, offset, 0);
|
||||
offset += 4;
|
||||
ret.size += 4;
|
||||
} else if (theSize==27) { // next 8 bytes are uint64_t data
|
||||
ret.uint = tvb_get_guint64(tvb, offset, 0);
|
||||
offset += 8;
|
||||
ret.size += 8;
|
||||
}
|
||||
ret.totalSize = ret.size;
|
||||
|
@ -268,19 +264,15 @@ static cborObj cbor_info(tvbuff_t *tvb, int offset)
|
|||
ret.uint = (tmp & 0x1F);
|
||||
} else if (theSize==24) { // next byte is uint8_t data (length)
|
||||
ret.uint = tvb_get_guint8(tvb, offset);
|
||||
offset += 1;
|
||||
ret.size += 1;
|
||||
} else if (theSize==25) { // next 2bytes are uint16_t data (length)
|
||||
ret.uint = tvb_get_guint16(tvb, offset, 0);
|
||||
offset += 2;
|
||||
ret.size += 2;
|
||||
} else if (theSize==26) { // next 4bytes are uint32_t data
|
||||
ret.uint = tvb_get_guint32(tvb, offset, 0);
|
||||
offset += 4;
|
||||
ret.size += 4;
|
||||
} else if (theSize==27) { // next byte is uint64_t data
|
||||
ret.uint = tvb_get_guint64(tvb, offset, 0);
|
||||
offset += 8;
|
||||
ret.size += 8;
|
||||
}
|
||||
ret.totalSize = ret.size+ret.uint;
|
||||
|
@ -293,22 +285,18 @@ static cborObj cbor_info(tvbuff_t *tvb, int offset)
|
|||
} else if (theSize==24) // next byte is uint8_t data
|
||||
{
|
||||
ret.uint = tvb_get_guint8(tvb, offset);
|
||||
offset += 1;
|
||||
ret.size += 1;
|
||||
} else if (theSize==25) // next 2bytes are uint16_t data
|
||||
{
|
||||
ret.uint = tvb_get_guint16(tvb, offset, 0);
|
||||
offset += 2;
|
||||
ret.size += 2;
|
||||
} else if (theSize==26) // next 4bytes are uint32_t data
|
||||
{
|
||||
ret.uint = tvb_get_guint32(tvb, offset, 0);
|
||||
offset += 4;
|
||||
ret.size += 4;
|
||||
} else if (theSize==27) // next byte is uint64_t data
|
||||
{
|
||||
ret.uint = tvb_get_guint64(tvb, offset, 0);
|
||||
offset += 8;
|
||||
ret.size += 8;
|
||||
}
|
||||
ret.totalSize = ret.size+ret.uint;
|
||||
|
@ -321,22 +309,18 @@ static cborObj cbor_info(tvbuff_t *tvb, int offset)
|
|||
} else if (theSize==24) // next byte is uint8_t data
|
||||
{
|
||||
ret.uint = tvb_get_guint8(tvb, offset);
|
||||
offset += 1;
|
||||
ret.size += 1;
|
||||
} else if (theSize==25) // next 2bytes are uint16_t data
|
||||
{
|
||||
ret.uint = tvb_get_guint16(tvb, offset, 0);
|
||||
offset += 2;
|
||||
ret.size += 2;
|
||||
} else if (theSize==26) // next 4bytes are uint32_t data
|
||||
{
|
||||
ret.uint = tvb_get_guint32(tvb, offset, 0);
|
||||
offset += 4;
|
||||
ret.size += 4;
|
||||
} else if (theSize==27) // next byte is uint64_t data
|
||||
{
|
||||
ret.uint = tvb_get_guint64(tvb, offset, 0);
|
||||
offset += 8;
|
||||
ret.size += 8;
|
||||
}
|
||||
// I know how many elements are in the array, but NOT the total
|
||||
|
|
Loading…
Reference in New Issue