Text   |  XML   |  ReML   |   Visible Warnings:

Unreachable Control Flow  at semcheck.c:306

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

check_exists

(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/dfilter/semcheck.c)expand/collapse
Show more  
 290  check_exists(stnode_t *st_arg1)
 291  {
 292  #ifdef DEBUG_dfilter 
 293          static guint i = 0;
 294  #endif
 295   
 296          DebugLog(("   4 check_exists() [%u]\n", i++));
 297          switch (stnode_type_id(st_arg1)) {
 298                  case STTYPE_FIELD:
 299                          /* This is OK */
 300                          break;
 301                  case STTYPE_STRING:
 302                  case STTYPE_UNPARSED:
 303                          dfilter_fail("\"%s\" is neither a field nor a protocol name.",
 304                                          stnode_data(st_arg1));
 305                          THROW(TypeError);
 306                          break;
 307   
 308                  case STTYPE_RANGE:
 309                          /*
 310                           * XXX - why not?  Shouldn't "eth[3:2]" mean 
 311                           * "check whether the 'eth' field is present and
 312                           * has at least 2 bytes starting at an offset of
 313                           * 3"?
 314                           */
 315                          dfilter_fail("You cannot test whether a range is present.");
 316                          THROW(TypeError);
 317                          break;
 318   
 319                  case STTYPE_FUNCTION:
 320              /* XXX - Maybe we should change functions so they can return fields,
 321               * in which case the 'exist' should be fine. */
 322                          dfilter_fail("You cannot test whether a function is present.");
 323                          THROW(TypeError);
 324                          break;
 325   
 326                  case STTYPE_UNINITIALIZED:
 327                  case STTYPE_TEST:
 328                  case STTYPE_INTEGER:
 329                  case STTYPE_FVALUE:
 330                  case STTYPE_NUM_TYPES:
 331                          g_assert_not_reached();
 332          }
 333  }
Show more  




Change Warning 1156.29896 : Unreachable Control Flow

Because they are very similar, this warning shares annotations with warnings 1156.29897 and 1156.29898.

Priority:
State:
Finding:
Owner:
Note: