Avoid some unnecessary assignments (as reported by clang).
authormartinm <martinm@f5534014-38df-0310-8fa8-9805f1628bb7>
Wed, 16 Mar 2011 23:18:59 +0000 (23:18 +0000)
committermartinm <martinm@f5534014-38df-0310-8fa8-9805f1628bb7>
Wed, 16 Mar 2011 23:18:59 +0000 (23:18 +0000)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36204 f5534014-38df-0310-8fa8-9805f1628bb7

epan/dissectors/packet-pdcp-lte.c
epan/dissectors/packet-rlc-lte.c

index d73a5fe529f665178dac43767157b67db3fbcf5f..0a8920b99a508ac7508de78697f9e976713a223a 100644 (file)
@@ -387,7 +387,6 @@ static void addChannelSequenceInfo(pdcp_sequence_report_in_frame *p,
     proto_tree *seqnum_tree;
     proto_item *seqnum_ti;
     proto_item *ti;
-    guint16 snLimit;
 
     /* Create subtree */
     seqnum_ti = proto_tree_add_string_format(tree,
@@ -410,16 +409,11 @@ static void addChannelSequenceInfo(pdcp_sequence_report_in_frame *p,
                             tvb, 0, 0, p->sequenceExpected);
     PROTO_ITEM_SET_GENERATED(ti);
 
-    /* Work out SN wrap (in case needed below) */
+    /* Make sure we have recognised SN length */
     switch (p_pdcp_lte_info->seqnum_length) {
         case PDCP_SN_LENGTH_5_BITS:
-            snLimit = 32;
-            break;
         case PDCP_SN_LENGTH_7_BITS:
-            snLimit = 128;
-            break;
         case PDCP_SN_LENGTH_12_BITS:
-            snLimit = 4096;
             break;
         default:
             DISSECTOR_ASSERT_NOT_REACHED();
@@ -2298,7 +2292,8 @@ static void dissect_pdcp_lte(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
                  /* UO-1 if !(ipv4 && rand) */
                  if (!((p_pdcp_info->rohc_ip_version == 4) &&
                       (!p_pdcp_info->rnd))) {
-                    offset = dissect_pdcp_uo_1_packet(rohc_tree, rohc_ti, tvb, offset, p_pdcp_info, pinfo);
+
+                    dissect_pdcp_uo_1_packet(rohc_tree, rohc_ti, tvb, offset, p_pdcp_info, pinfo);
                  } else {
                     /* Whether its UO-1-ID or UO-1-TS depends upon T bit */
                     dissect_pdcp_uo_1_ts_or_id_packet(rohc_tree, rohc_ti, tvb, offset, p_pdcp_info, pinfo);
@@ -2316,7 +2311,7 @@ static void dissect_pdcp_lte(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
         if (!((p_pdcp_info->rohc_ip_version == 4) &&
               (!p_pdcp_info->rnd))) {
 
-            offset = dissect_pdcp_uor_2_packet(rohc_tree, rohc_ti, tvb, offset, p_pdcp_info, pinfo);
+            dissect_pdcp_uor_2_packet(rohc_tree, rohc_ti, tvb, offset, p_pdcp_info, pinfo);
         }
         else {
             /* Whether its UOR-2-ID or UOR-2-TS depends upon T bit */
@@ -3061,9 +3056,6 @@ void proto_register_pdcp(void)
 
 void proto_reg_handoff_pdcp_lte(void)
 {
-    dissector_handle_t pdcp_lte_handle;
-
-    pdcp_lte_handle = find_dissector("pdcp-lte");
     /* Add as a heuristic UDP dissector */
     heur_dissector_add("udp", dissect_pdcp_lte_heur, proto_pdcp_lte);
 
index 686c22a3ab23b30b403c21addfbf0c706aff4cb7..62e9cb5c3d66138f638104e34f8be232b1539275 100644 (file)
@@ -454,13 +454,8 @@ static int dissect_rlc_lte_extension_header(tvbuff_t *tvb, packet_info *pinfo _U
     /* May need to skip padding after last extension part */
     isOdd = (s_number_of_extensions % 2);
     if (isOdd) {
-        guint8 padding;
-        proto_item *ti;
-
-        padding = tvb_get_guint8(tvb, offset) & 0x0f;
-        ti = proto_tree_add_item(tree, hf_rlc_lte_extension_padding,
-                                 tvb, offset, 1, FALSE);
-        offset++;
+        proto_tree_add_item(tree, hf_rlc_lte_extension_padding,
+                            tvb, offset++, 1, FALSE);
     }
 
     return offset;
@@ -2559,9 +2554,6 @@ void proto_register_rlc_lte(void)
 void
 proto_reg_handoff_rlc_lte(void)
 {
-    dissector_handle_t rlc_lte_handle;
-
-    rlc_lte_handle = find_dissector("rlc-lte");
     /* Add as a heuristic UDP dissector */
     heur_dissector_add("udp", dissect_rlc_lte_heur, proto_rlc_lte);
 }