(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/ftypes/ftype-tvbuff.c) |
| |
| 180 | | | static void |
| 181 | | | slice(fvalue_t *fv, GByteArray *bytes, guint offset, guint length) |
| 182 | | | { |
| 183 | | | const guint8* data; |
| 184 | | | |
| 185 | | | if (fv->value.tvb) { |
| 186 | | | TRY {
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/exceptions.h |
| |
176 | #define TRY \ |
177 | {\ |
178 | except_t *exc; \ |
179 | volatile int except_state = 0; \ |
180 | static const except_id_t catch_spec[] = { \ |
181 | { XCEPT_GROUP_WIRESHARK, XCEPT_CODE_ANY } }; \ |
182 | except_try_push(catch_spec, 1, &exc); \ |
183 | \ |
184 | if(except_state & EXCEPT_CAUGHT) \ |
185 | except_state |= EXCEPT_RETHROWN; \ |
186 | except_state &= ~EXCEPT_CAUGHT; \ |
187 | \ |
188 | if (except_state == 0 && exc == 0) \ |
189 | /* user's code goes here */ |
| |
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/except.h |
| |
143 | #define except_try_push(ID, NUM, PPE) \ |
144 | { \ |
145 | struct except_stacknode except_sn; \ |
146 | struct except_catch except_ch; \ |
147 | except_setup_try(&except_sn, &except_ch, ID, NUM); \ |
148 | if (setjmp(except_ch.except_jmp)) \ |
149 | *(PPE) = &except_ch.except_obj; \ |
150 | else \ |
151 | *(PPE) = 0 |
| |
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/exceptions.h |
| |
165 | #define EXCEPT_CAUGHT 1 /* exception has been caught, no need to rethrow at |
| |
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/exceptions.h |
| |
168 | #define EXCEPT_RETHROWN 2 /* the exception was rethrown from a CATCH |
| |
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/exceptions.h |
| |
165 | #define EXCEPT_CAUGHT 1 /* exception has been caught, no need to rethrow at |
| |
|
| 187 | | | data = tvb_get_ptr(fv->value.tvb, offset, length); |
| 188 | | | g_byte_array_append(bytes, data, length); |
| 189 | | | } |
| 190 | | | CATCH_ALL {
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/exceptions.h |
| |
213 | #define CATCH_ALL \ |
214 | if (except_state == 0 && exc != 0 && \ |
215 | (except_state|=EXCEPT_CAUGHT)) \ |
216 | /* user's code goes here */ |
| |
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/exceptions.h |
| |
165 | #define EXCEPT_CAUGHT 1 /* exception has been caught, no need to rethrow at |
| |
|
Empty if Statement
Body of if has no effect. This warning could be triggered if: - the body contains no code, or
- the body is removed by the preprocessor, or
- all the macros used in the body expand to nothing.
|
|
| 191 | | | |
| 192 | | | } |
| 193 | | | ENDTRY;
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/exceptions.h |
| |
191 | #define ENDTRY \ |
192 | /* rethrow the exception if necessary */ \ |
193 | if(!(except_state&EXCEPT_CAUGHT) && exc != 0) \ |
194 | except_rethrow(exc); \ |
195 | except_try_pop();\ |
196 | } |
| |
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/exceptions.h |
| |
165 | #define EXCEPT_CAUGHT 1 /* exception has been caught, no need to rethrow at |
| |
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/except.h |
| |
153 | #define except_try_pop() \ |
154 | except_free(except_ch.except_obj.except_dyndata); \ |
155 | except_pop(); \ |
156 | } |
| |
|
| 194 | | | |
| 195 | | | } |
| 196 | | | } |
| 197 | | | |
| 198 | | | static gboolean |
| 199 | | | cmp_eq(fvalue_t *fv_a, fvalue_t *fv_b) |
| 200 | | | { |
| |