From 77f87b7a012daa84056d16010e4d92447fe05651 Mon Sep 17 00:00:00 2001 From: Alexis La Goutte Date: Mon, 2 Mar 2015 16:01:57 +0100 Subject: Byte view tab (Qt): Fix Dead Store (Dead assignement/Dead increment) warning found by Clang Remove unused bmask variable Change-Id: I44613f1d949dbaf8e559b3bfb2196609d821c4f3 Reviewed-on: https://code.wireshark.org/review/7496 Reviewed-by: Gerald Combs Reviewed-by: Alexis La Goutte --- ui/qt/byte_view_tab.cpp | 22 ---------------------- 1 file changed, 22 deletions(-) (limited to 'ui/qt/byte_view_tab.cpp') diff --git a/ui/qt/byte_view_tab.cpp b/ui/qt/byte_view_tab.cpp index 72968613d2..c374db29bd 100644 --- a/ui/qt/byte_view_tab.cpp +++ b/ui/qt/byte_view_tab.cpp @@ -86,7 +86,6 @@ void ByteViewTab::protoTreeItemChanged(QTreeWidgetItem *current) { QTreeWidgetItem *parent = current->parent(); field_info *parent_fi = NULL; int f_start = -1, f_end = -1, f_len = -1; - guint32 bmask = 0x00; int fa_start = -1, fa_end = -1, fa_len = -1; int p_start = -1, p_end = -1, p_len = -1; guint len = tvb_length(fi->ds_tvb); @@ -124,29 +123,9 @@ void ByteViewTab::protoTreeItemChanged(QTreeWidgetItem *current) { } /* bmask = finfo->hfinfo->bitmask << hfinfo_bitshift(finfo->hfinfo); */ /* (value & mask) >> shift */ - if (fi->hfinfo) bmask = fi->hfinfo->bitmask; fa_start = fi->appendix_start; fa_len = fi->appendix_length; - if (!FI_GET_FLAG(fi, FI_LITTLE_ENDIAN) && - !FI_GET_FLAG(fi, FI_BIG_ENDIAN)) { - /* unknown endianess - disable mask */ - bmask = 0x00; - } - - if (bmask == 0x00) { - int bito = FI_GET_BITS_OFFSET(fi); - int bitc = FI_GET_BITS_SIZE(fi); - int bitt = bito + bitc; - - /* construct mask using bito & bitc */ - /* XXX, mask has only 32 bit, later we can store bito&bitc, and use them (which should be faster) */ - if (bitt > 0 && bitt < 32) { - - bmask = ((1 << bitc) - 1) << ((8-bitt) & 7); - } - } - if (p_start >= 0 && p_len > 0 && (guint)p_start < len) { p_end = p_start + p_len; } @@ -159,7 +138,6 @@ void ByteViewTab::protoTreeItemChanged(QTreeWidgetItem *current) { if (f_end == -1 && fa_end != -1) { f_start = fa_start; - bmask = 0x00; f_end = fa_end; fa_start = fa_end = -1; } -- cgit v1.2.1