summaryrefslogtreecommitdiff
path: root/ui/qt/byte_view_tab.cpp
diff options
context:
space:
mode:
authorAlexis La Goutte <alexis.lagoutte@gmail.com>2015-03-02 16:01:57 +0100
committerAlexis La Goutte <alexis.lagoutte@gmail.com>2015-04-07 18:34:38 +0000
commit77f87b7a012daa84056d16010e4d92447fe05651 (patch)
treea6ef6cd7529cfe3ea03ac0fb5d5d0a18f05aa830 /ui/qt/byte_view_tab.cpp
parentf4670098153ce352a8b812f80bfff714cf59fcf5 (diff)
downloadwireshark-77f87b7a012daa84056d16010e4d92447fe05651.tar.gz
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 <gerald@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Diffstat (limited to 'ui/qt/byte_view_tab.cpp')
-rw-r--r--ui/qt/byte_view_tab.cpp22
1 files changed, 0 insertions, 22 deletions
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;
}