Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
authorAlexis La Goutte <alexis.lagoutte@gmail.com>
Mon, 4 Jun 2012 22:26:40 +0000 (22:26 -0000)
committerAlexis La Goutte <alexis.lagoutte@gmail.com>
Mon, 4 Jun 2012 22:26:40 +0000 (22:26 -0000)
svn path=/trunk/; revision=43091

epan/dissectors/packet-ncp.c
epan/dissectors/packet-pgsql.c
epan/dissectors/packet-pvfs2.c
epan/dissectors/packet-rpcap.c
epan/dissectors/packet-rtmpt.c

index 36a922a7b26f0b9a5a07e7656445260100a2d807..6dbf14ddbe0562922b08fbb43cf9d617e2c27955 100644 (file)
@@ -396,7 +396,7 @@ dissect_ncp_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
                  * conversation in our hash, create
                  * one */
                 if (request_value == NULL) {
-                    request_value = mncp_hash_insert(conversation, nw_connection, header.task, pinfo);
+                    mncp_hash_insert(conversation, nw_connection, header.task, pinfo);
                 }
             } else {
                 /* It's not part of any conversation
@@ -404,7 +404,7 @@ dissect_ncp_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
                  */
                 conversation = conversation_new(pinfo->fd->num, &pinfo->src,
                     &pinfo->dst, PT_NCP, (guint32) pinfo->srcport, (guint32) pinfo->destport, 0);
-                request_value = mncp_hash_insert(conversation, nw_connection, header.task, pinfo);
+                mncp_hash_insert(conversation, nw_connection, header.task, pinfo);
             }
             /* If this is a request packet then we
              * might have a new task
@@ -439,7 +439,7 @@ dissect_ncp_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
                  * conversation in our hash, create
                  * one */
                 if (request_value == NULL) {
-                    request_value = mncp_hash_insert(conversation, nw_connection, header.task, pinfo);
+                    mncp_hash_insert(conversation, nw_connection, header.task, pinfo);
                 }
             } else {
                 /* It's not part of any conversation
@@ -447,7 +447,7 @@ dissect_ncp_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
                  */
                 conversation = conversation_new(pinfo->fd->num, &pinfo->src,
                     &pinfo->dst, PT_NCP, (guint32) pinfo->srcport, (guint32) pinfo->destport, 0);
-                request_value = mncp_hash_insert(conversation, nw_connection, header.task, pinfo);
+                mncp_hash_insert(conversation, nw_connection, header.task, pinfo);
             }
             /* find the record telling us the request
              * made that caused this reply
index f5450bdd249856f8d4abef0a2d32c2ca731699c8..f3dc798b224825afc0988127bd1d89713b9a97b8 100644 (file)
@@ -385,7 +385,6 @@ static void dissect_pgsql_fe_msg(guchar type, guint length, tvbuff_t *tvb,
     /* Describe, Close */
     case 'D':
     case 'C':
-        i = 0;
         c = tvb_get_guint8(tvb, n);
         if (c == 'P')
             i = hf_portal;
index 3076e90bc5aed7ee5ba9b22034f996225f1a52b6..13ad273497087ed1741e76e768547fe518a56708 100644 (file)
@@ -1576,7 +1576,7 @@ dissect_pvfs2_io_request(tvbuff_t *tvb, proto_tree *tree, int offset,
        /* */
        offset += 4;
 
-       offset = dissect_pvfs_pint_request(tvb, tree, offset);
+       /*offset = */dissect_pvfs_pint_request(tvb, tree, offset);
 
        /* TODO: remove this!!! */
        offset = tvb_length(tvb) - 16;
@@ -3205,7 +3205,7 @@ dissect_pvfs_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree,
        if (mode == TCP_MODE_UNEXP)
        {
                /* Request */
-               offset = dissect_pvfs2_request(tvb, pvfs_tree, offset, pinfo, server_op);
+               /*offset = */dissect_pvfs2_request(tvb, pvfs_tree, offset, pinfo, server_op);
        }
        else
        {
@@ -3224,7 +3224,7 @@ dissect_pvfs_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree,
 #endif
                {
                        /* Response */
-                       offset = dissect_pvfs2_response(tvb, pvfs_tree, offset, pinfo,
+                       /*offset = */dissect_pvfs2_response(tvb, pvfs_tree, offset, pinfo,
                                        server_op);
                }
        }
index 129e3501ba3badccd4fa7d395f384a80870ffe61..20562c2f783c9daa21de863fa76c9266fb791be7 100644 (file)
@@ -632,7 +632,7 @@ dissect_rpcap_filter (tvbuff_t *tvb, packet_info *pinfo,
 }
 
 
-static void
+static int
 dissect_rpcap_auth_request (tvbuff_t *tvb, packet_info *pinfo _U_,
                            proto_tree *parent_tree, gint offset)
 {
@@ -673,6 +673,7 @@ dissect_rpcap_auth_request (tvbuff_t *tvb, packet_info *pinfo _U_,
 
     proto_item_append_text (ti, " (%s/%s)", username, password);
   }
+  return offset;
 }
 
 
@@ -834,6 +835,7 @@ dissect_rpcap_sampling_request (tvbuff_t *tvb, packet_info *pinfo _U_,
   default:
     break;
   }
+  return offset;
 }
 
 
index a83efe6bcc07ed00f1c88a0f7e370c7cef04407b..e2e9d606c4133e5d37921e524bb8de9d9440dae1 100644 (file)
@@ -1400,7 +1400,6 @@ dissect_rtmpt_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, rtmpt_
                                         id = tf->saved.d[0];
                                         header_type = (id>>6) & 3;
                                         basic_hlen = rtmpt_basic_header_length(id);
-                                        message_hlen = rtmpt_message_header_length(id);
 
                                         if (header_type<3 && tf->have<basic_hlen+3 && tf->have+want>=basic_hlen+3) {
                                                 if (pntoh24(tf->saved.d+basic_hlen)==0xffffff) {