Text   |  XML   |  ReML   |   Visible Warnings:

Ignored Return Value  at packet-ros.c:248

No properties have been set. | edit properties
Jump to warning location ↓ warning details...
Show Events | Options

ros_try_string

(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/dissectors/packet-ros.c)expand/collapse
Show more  
 193  static gboolean ros_try_string(const char *oid, tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 194  {
 195          ros_info_t *rinfo;
 196          gint32     opcode = 0;
 197          const gchar *opname = NULL;
 198          const gchar *suffix = NULL;
 199          int offset = 0;
 200          new_dissector_t opdissector = NULL;
 201          const value_string *lookup;
 202          proto_item *item=NULL;
 203          proto_tree *ros_tree=NULL;
 204   
 205          if((rinfo = (ros_info_t*)g_hash_table_lookup(protocol_table, oid)) != NULL) {
 206   
 207                  if(tree){
 208                          item = proto_tree_add_item(tree, *(rinfo->proto), tvb, 0, -1, FALSE);
 209                          ros_tree = proto_item_add_subtree(item, *(rinfo->ett_proto));
 210                  }
 211   
 212                  if (check_col(pinfo->cinfo, COL_PROTOCOL))
 213                          col_set_str(pinfo->cinfo, COL_PROTOCOL, rinfo->name);
 214   
 215                  /* if this is a bind operation */
 216                  if((session->ros_op & ROS_OP_TYPE_MASK) == ROS_OP_BIND) {
 217                          /* use the in-built operation codes */
 218                          if((session->ros_op & ROS_OP_PDU_MASK) ==  ROS_OP_ERROR)
 219                                  opcode = err_ros_bind;
 220                          else 
 221                                  opcode = op_ros_bind;                            
 222                  } else 
 223                          /* otherwise just take the opcode */
 224                          opcode = session->ros_op & ROS_OP_OPCODE_MASK;
 225   
 226                  /* default lookup in the operations */
 227                  lookup = rinfo->opr_code_strings;
 228   
 229                  switch(session->ros_op & ROS_OP_PDU_MASK) {
 230                  case ROS_OP_ARGUMENT:    
 231                          opdissector = ros_lookup_opr_dissector(opcode, rinfo->opr_code_dissectors, TRUE);
 232                          suffix = "_argument";
 233                          break;
 234                  case ROS_OP_RESULT:      
 235                          opdissector = ros_lookup_opr_dissector(opcode, rinfo->opr_code_dissectors, FALSE);
 236                          suffix = "_result";
 237                          break;
 238                  case ROS_OP_ERROR:      
 239                          opdissector = ros_lookup_err_dissector(opcode, rinfo->err_code_dissectors);
 240                          lookup = rinfo->err_code_strings;
 241                          break;
 242                  default:
 243                          break;
 244                  }
 245   
 246                  if(opdissector) {
 247   
 248                          opname = val_to_str(opcode, lookup, "Unknown opcode (%d)");
 249   
 250                          if (check_col(pinfo->cinfo, COL_INFO)) {
 251                                  col_set_str(pinfo->cinfo, COL_INFO, opname);
 252                                  if(suffix)
 253                                          col_append_str(pinfo->cinfo, COL_INFO, suffix);
 254                          }
 255                           
 256                          offset = (*opdissector)(tvb, pinfo, ros_tree);
 257   
 258                          return TRUE;
 259                  }
 260          }
 261   
 262          return FALSE;
 263  }
Show more  




Change Warning 5473.35756 : Ignored Return Value

Priority:
State:
Finding:
Owner:
Note: