Don't assign to a variable if the value won't be used: Coverity 817-821.
authorwmeier <wmeier@f5534014-38df-0310-8fa8-9805f1628bb7>
Mon, 4 Apr 2011 15:31:33 +0000 (15:31 +0000)
committerwmeier <wmeier@f5534014-38df-0310-8fa8-9805f1628bb7>
Mon, 4 Apr 2011 15:31:33 +0000 (15:31 +0000)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36446 f5534014-38df-0310-8fa8-9805f1628bb7

dftest.c
epan/addr_resolv.c
epan/dfilter/gencode.c
epan/dfilter/semcheck.c
epan/dissectors/packet-infiniband_sdp.c

index 5d82b6374b4a90ad0f7f48c7f7f4bf44dc66031d..c7ad6f363c41d80cf0f69a11241d1127af2119e8 100644 (file)
--- a/dftest.c
+++ b/dftest.c
@@ -62,7 +62,6 @@ main(int argc, char **argv)
        char            *gpf_path, *pf_path;
        int             gpf_open_errno, gpf_read_errno;
        int             pf_open_errno, pf_read_errno;
-       e_prefs         *prefs_p;
        dfilter_t       *df;
 
        /*
@@ -98,7 +97,7 @@ main(int argc, char **argv)
        /* set the c-language locale to the native environment. */
        setlocale(LC_ALL, "");
 
-       prefs_p = read_prefs(&gpf_open_errno, &gpf_read_errno, &gpf_path,
+       read_prefs(&gpf_open_errno, &gpf_read_errno, &gpf_path,
                &pf_open_errno, &pf_read_errno, &pf_path);
        if (gpf_path != NULL) {
                if (gpf_open_errno != 0) {
index 89094a82fcc8d9675f0c0de5d76bd100d380351d..be5c5ec54fd83ea7ae389be2f9a439ae9e21da85 100644 (file)
@@ -506,7 +506,7 @@ parse_service_line (char *line)
 
   port = cp;
 
-  if ((cp = strtok(cp, "/")) == NULL)
+  if (strtok(cp, "/") == NULL)
     return;
 
   if ((cp = strtok(NULL, "/")) == NULL)
index 7f140cbc493a29054d54245d089621ddd86ce7fb..0b6a5ad4cd62729e41e4126078c299fb90f94cf9 100644 (file)
@@ -430,9 +430,9 @@ gen_test(dfwork_t *dfw, stnode_t *st_node)
 static void
 gencode(dfwork_t *dfw, stnode_t *st_node)
 {
-       const char      *name;
+       /* const char   *name; */
 
-       name = stnode_type_name(st_node);
+       /* name = */stnode_type_name(st_node);  /* XXX: is this being done just for the side-effect ? */
 
        switch (stnode_type_id(st_node)) {
                case STTYPE_TEST:
index 369aacf93c77a1278f858cafd6e4c2ab3c7f8bdc..01ae0c056a7bf28bfb1b904413f20b7dd93b31a1 100644 (file)
@@ -957,7 +957,7 @@ check_relation_LHS_FUNCTION(const char *relation_string, FtypeCanFunc can_func,
        drange_node             *rn;
        df_func_def_t   *funcdef;
        df_func_def_t   *funcdef2;
-       GSList          *params;
+       /* GSList          *params; */
 
        check_function(st_arg1);
        type2 = stnode_type_id(st_arg2);
@@ -965,7 +965,7 @@ check_relation_LHS_FUNCTION(const char *relation_string, FtypeCanFunc can_func,
        funcdef = sttype_function_funcdef(st_arg1);
        ftype1 = funcdef->retval_ftype;
 
-       params = sttype_function_params(st_arg1);
+       /* params = */sttype_function_params(st_arg1);  /* XXX: is this done for the side-effect ? */
 
        DebugLog(("    5 check_relation_LHS_FUNCTION(%s)\n", relation_string));
 
index 652ab5fc3a83bc40574d858de1c70449c8d5e0a7..b7443eeb75bc5cbc4279021166d00b0d3834bb52 100644 (file)
@@ -277,7 +277,7 @@ manual_override:
             proto_tree_add_item(SDP_EH_header_tree, hf_ib_sdp_extmaxadverts, tvb, local_offset, 2, FALSE); local_offset += 2;
             break;
         case HelloAck:
-            SDP_EH_header_item = proto_tree_add_item(SDP_header_tree, hf_ib_sdp_hah, tvb, local_offset, 48, FALSE);
+            proto_tree_add_item(SDP_header_tree, hf_ib_sdp_hah, tvb, local_offset, 48, FALSE);
             break;
         case DisConn:
             break;
@@ -286,13 +286,13 @@ manual_override:
         case SendSm:
             break;
         case RdmaWrCompl:
-            SDP_EH_header_item = proto_tree_add_item(SDP_header_tree, hf_ib_sdp_rwch, tvb, local_offset, 48, FALSE);
+            proto_tree_add_item(SDP_header_tree, hf_ib_sdp_rwch, tvb, local_offset, 48, FALSE);
             break;
         case RdmaRdCompl:
-            SDP_EH_header_item = proto_tree_add_item(SDP_header_tree, hf_ib_sdp_rrch, tvb, local_offset, 48, FALSE);
+            proto_tree_add_item(SDP_header_tree, hf_ib_sdp_rrch, tvb, local_offset, 48, FALSE);
             break;
         case ModeChange:
-            SDP_EH_header_item = proto_tree_add_item(SDP_BSDH_header_tree, hf_ib_sdp_mch, tvb, local_offset, 48, FALSE);
+            proto_tree_add_item(SDP_BSDH_header_tree, hf_ib_sdp_mch, tvb, local_offset, 48, FALSE);
             break;
         case SrcAvailCancel:
             break;
@@ -301,24 +301,24 @@ manual_override:
         case SinkCancelAck:
             break;
         case ChRcvBuf:
-            SDP_EH_header_item = proto_tree_add_item(SDP_header_tree, hf_ib_sdp_crbh, tvb, local_offset, 48, FALSE);
+            proto_tree_add_item(SDP_header_tree, hf_ib_sdp_crbh, tvb, local_offset, 48, FALSE);
             break;
         case ChRcvBufAck:
-            SDP_EH_header_item = proto_tree_add_item(SDP_header_tree, hf_ib_sdp_crbah, tvb, local_offset, 48, FALSE);
+            proto_tree_add_item(SDP_header_tree, hf_ib_sdp_crbah, tvb, local_offset, 48, FALSE);
             break;
         case SuspComm:
-            SDP_EH_header_item = proto_tree_add_item(SDP_header_tree, hf_ib_sdp_suspch, tvb, local_offset, 48, FALSE);
+            proto_tree_add_item(SDP_header_tree, hf_ib_sdp_suspch, tvb, local_offset, 48, FALSE);
             break;
         case SuspCommAck:
             break;
         case SinkAvail:
-            SDP_EH_header_item = proto_tree_add_item(SDP_header_tree, hf_ib_sdp_sinkah, tvb, local_offset, 48, FALSE);
+            proto_tree_add_item(SDP_header_tree, hf_ib_sdp_sinkah, tvb, local_offset, 48, FALSE);
             break;
         case SrcAvail:
-            SDP_EH_header_item = proto_tree_add_item(SDP_header_tree, hf_ib_sdp_srcah, tvb, local_offset, 48, FALSE);
+            proto_tree_add_item(SDP_header_tree, hf_ib_sdp_srcah, tvb, local_offset, 48, FALSE);
             break;
         case Data:
-            SDP_EH_header_item = proto_tree_add_item(SDP_header_tree, hf_ib_sdp_data, tvb, local_offset, -1, FALSE);
+            proto_tree_add_item(SDP_header_tree, hf_ib_sdp_data, tvb, local_offset, -1, FALSE);
             break;
         default:
             break;