Text   |  XML   |  ReML   |   Visible Warnings:

Unreachable Computation  at oids.c:150

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

add_oid

(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/oids.c)expand/collapse
Show more  
 79  static oid_info_t* add_oid(const char* name, oid_kind_t kind, const oid_value_type_t* type, oid_key_t* key, guint oid_len, guint32 *subids) {
 80          guint i = 0;
 81          oid_info_t* c = &oid_root;
 82   
 83          if (!oid_root.children) {
 84                  char* debug_env = getenv("WIRESHARK_DEBUG_MIBS");
 85                  guint32 subid;
 86   
 87                  debuglevel = debug_env ? strtoul(debug_env,NULL,10) : 0;
 88   
 89                  oid_root.children = pe_tree_create(EMEM_TREE_TYPE_RED_BLACK,"oid_root");
 90   
 91                  /*
 92                   * make sure we got strings at least in the three root-children oids 
 93                   * that way oid_resolved() will always have a string to print 
 94                   */
 95                  subid = 0; oid_add("itu-t",1,&subid);
 96                  subid = 1; oid_add("iso",1,&subid);
 97                  subid = 2; oid_add("joint-iso-itu-t",1,&subid);
 98          }
 99   
 100          oid_len--;
 101   
 102          do {
 103                  oid_info_t* n = emem_tree_lookup32(c->children,subids[i]);
 104   
 105                  if(n) {
 106                          if (i == oid_len) {
 107                                  if (n->name) {
 108                                          if (!g_str_equal(n->name,name)) {
 109                                                  D(2,("Renaming Oid from: %s -> %s, this means the same oid is registered more than once",n->name,name));
 110                                          }
 111                                          /* XXX - Don't free n->name here. It may be part of an hf_register_info 
 112                                           * struct that has been appended to the hfa GArray. */
 113                                  }
 114   
 115                                  n->name = g_strdup(name);
 116   
 117                                  if (! n->value_type) {
 118                                          n->value_type = type;
 119                                  }
 120   
 121                                  return n;
 122                          }
 123                  } else {
 124                          n = g_malloc(sizeof(oid_info_t));
 125                          n->subid = subids[i];
 126                          n->kind = kind;
 127                          n->children = pe_tree_create(EMEM_TREE_TYPE_RED_BLACK,"oid_children");
 128                          n->value_hfid = -2;
 129                          n->key = key;
 130                          n->parent = c;
 131                          n->bits = NULL;
 132   
 133                          emem_tree_insert32(c->children,n->subid,n);
 134   
 135                          if (i == oid_len) {
 136                                  n->name = g_strdup(name);
 137                                  n->value_type = type;
 138                                  n->kind = kind;
 139                                  return n;
 140                          } else {
 141                                  n->name = NULL;
 142                                  n->value_type = NULL;
 143                                  n->kind = OID_KIND_UNKNOWN;
 144                          }
 145                  }
 146                  c = n;
 147          } while(++i);
 148   
 149          g_assert_not_reached();
 150          return NULL;
 151  }
Show more  




Change Warning 1277.30495 : Unreachable Computation

Priority:
State:
Finding:
Owner:
Note: