(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/dfilter/semcheck.c) |
| |
| 1104 | | | check_test(stnode_t *st_node) |
| 1105 | | | { |
| 1106 | | | test_op_t st_op; |
| 1107 | | | stnode_t *st_arg1, *st_arg2; |
| 1108 | | | #ifdef DEBUG_dfilter |
| 1109 | | | static guint i = 0; |
| 1110 | | | #endif |
| 1111 | | | |
| 1112 | | | DebugLog((" 3 check_test(stnode_t *st_node = %p) [%u]\n", st_node, i)); |
| 1113 | | | |
| 1114 | | | sttype_test_get(st_node, &st_op, &st_arg1, &st_arg2); |
| 1115 | | | |
| 1116 | | | switch (st_op) { |
| 1117 | | | case TEST_OP_UNINITIALIZED: |
| 1118 | | | g_assert_not_reached();
x /usr/include/glib-2.0/glib/gtestutils.h |
| |
73 | #define g_assert_not_reached() do { g_assertion_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, NULL); } while (0) |
| |
x /usr/include/glib-2.0/glib/gmacros.h |
| |
160 | # define G_STRFUNC ((const char*) (__PRETTY_FUNCTION__)) |
| |
|
| 1119 | | | break; |
Unreachable Control Flow
The highlighted code will not execute under any circumstances. This may be because of: |
|
| 1120 | | | |
| 1121 | | | case TEST_OP_EXISTS: |
| 1122 | | | check_exists(st_arg1); |
| 1123 | | | break; |
| 1124 | | | |
| 1125 | | | case TEST_OP_NOT: |
| 1126 | | | semcheck(st_arg1); |
| 1127 | | | break; |
| 1128 | | | |
| 1129 | | | case TEST_OP_AND: |
| 1130 | | | case TEST_OP_OR: |
| 1131 | | | semcheck(st_arg1); |
| 1132 | | | semcheck(st_arg2); |
| 1133 | | | break; |
| 1134 | | | |
| 1135 | | | case TEST_OP_EQ: |
| 1136 | | | check_relation("==", FALSE, ftype_can_eq, st_node, st_arg1, st_arg2); |
| 1137 | | | break; |
| 1138 | | | case TEST_OP_NE: |
| 1139 | | | check_relation("!=", FALSE, ftype_can_ne, st_node, st_arg1, st_arg2); |
| 1140 | | | break; |
| 1141 | | | case TEST_OP_GT: |
| 1142 | | | check_relation(">", FALSE, ftype_can_gt, st_node, st_arg1, st_arg2); |
| 1143 | | | break; |
| 1144 | | | case TEST_OP_GE: |
| 1145 | | | check_relation(">=", FALSE, ftype_can_ge, st_node, st_arg1, st_arg2); |
| 1146 | | | break; |
| 1147 | | | case TEST_OP_LT: |
| 1148 | | | check_relation("<", FALSE, ftype_can_lt, st_node, st_arg1, st_arg2); |
| 1149 | | | break; |
| 1150 | | | case TEST_OP_LE: |
| 1151 | | | check_relation("<=", FALSE, ftype_can_le, st_node, st_arg1, st_arg2); |
| 1152 | | | break; |
| 1153 | | | case TEST_OP_BITWISE_AND: |
| 1154 | | | check_relation("&", FALSE, ftype_can_bitwise_and, st_node, st_arg1, st_arg2); |
| 1155 | | | break; |
| 1156 | | | case TEST_OP_CONTAINS: |
| 1157 | | | check_relation("contains", TRUE, ftype_can_contains, st_node, st_arg1, st_arg2); |
| 1158 | | | break; |
| 1159 | | | case TEST_OP_MATCHES: |
| 1160 | | | #ifdef HAVE_LIBPCRE |
| 1161 | | | check_relation("matches", TRUE, ftype_can_matches, st_node, st_arg1, st_arg2); |
| 1162 | | | #else |
| 1163 | | | dfilter_fail("This Wireshark version does not support the \"matches\" operation."); |
| 1164 | | | THROW(TypeError);
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/exceptions.h |
| |
223 | #define THROW(x) \ |
224 | except_throw(XCEPT_GROUP_WIRESHARK, (x), NULL) |
| |
|
| 1165 | | | #endif |
| 1166 | | | break; |
| 1167 | | | |
| 1168 | | | default: |
| 1169 | | | g_assert_not_reached();
x /usr/include/glib-2.0/glib/gtestutils.h |
| |
73 | #define g_assert_not_reached() do { g_assertion_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, NULL); } while (0) |
| |
x /usr/include/glib-2.0/glib/gmacros.h |
| |
160 | # define G_STRFUNC ((const char*) (__PRETTY_FUNCTION__)) |
| |
|
| 1170 | | | } |
| 1171 | | | DebugLog((" 3 check_test(stnode_t *st_node = %p) [%u] - End\n", st_node, i++)); |
| 1172 | | | } |
| |