aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors
diff options
context:
space:
mode:
authorAlexis La Goutte <alexis.lagoutte@gmail.com>2013-02-01 09:22:57 +0000
committerAlexis La Goutte <alexis.lagoutte@gmail.com>2013-02-01 09:22:57 +0000
commit2d776c5c291458358ee48c84416654ae32847d8d (patch)
tree3e23826d9cd32d64d5a9c834f36b4a65ef3e51c4 /epan/dissectors
parent7ef4c2f29c1e6a401e5ebad350469081e27759b7 (diff)
Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=47417
Diffstat (limited to 'epan/dissectors')
-rw-r--r--epan/dissectors/packet-image-png.c23
1 files changed, 7 insertions, 16 deletions
diff --git a/epan/dissectors/packet-image-png.c b/epan/dissectors/packet-image-png.c
index 7c2bf9d786..d9c592475b 100644
--- a/epan/dissectors/packet-image-png.c
+++ b/epan/dissectors/packet-image-png.c
@@ -96,30 +96,21 @@ static const value_string interlace_method_vals[] = {
static void
dissect_png_ihdr(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
{
- int offset=0;
- proto_tree_add_item(tree, hf_png_ihdr_width, tvb, offset, 4, ENC_BIG_ENDIAN);
- offset+=4;
+ proto_tree_add_item(tree, hf_png_ihdr_width, tvb, 0, 4, ENC_BIG_ENDIAN);
- proto_tree_add_item(tree, hf_png_ihdr_height, tvb, offset, 4, ENC_BIG_ENDIAN);
- offset+=4;
+ proto_tree_add_item(tree, hf_png_ihdr_height, tvb, 4, 4, ENC_BIG_ENDIAN);
- proto_tree_add_item(tree, hf_png_ihdr_bitdepth, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset+=1;
+ proto_tree_add_item(tree, hf_png_ihdr_bitdepth, tvb, 8, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(tree, hf_png_ihdr_colour_type, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset+=1;
+ proto_tree_add_item(tree, hf_png_ihdr_colour_type, tvb, 9, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(tree, hf_png_ihdr_compression_method, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset+=1;
+ proto_tree_add_item(tree, hf_png_ihdr_compression_method, tvb, 10, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(tree, hf_png_ihdr_filter_method, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset+=1;
+ proto_tree_add_item(tree, hf_png_ihdr_filter_method, tvb, 11, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(tree, hf_png_ihdr_interlace_method, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset+=1;
+ proto_tree_add_item(tree, hf_png_ihdr_interlace_method, tvb, 12, 1, ENC_BIG_ENDIAN);
- return;
}
static void