| Line | Branch | Condition | Exec | Source |
|---|---|---|---|---|
| 1 | #ifdef __cplusplus | |||
| 2 | extern "C" { | |||
| 3 | #endif | |||
| 4 | ||||
| 5 | int update_data(void); | |||
| 6 | ||||
| 7 | 1 | static int called_from_main(void) | ||
| 8 | { | |||
| 9 | 1 | return 0; | ||
| 10 | } | |||
| 11 | ||||
| 12 | 1 | static int called_from_update_data(void) | ||
| 13 | { | |||
| 14 | 1 | return 1; | ||
| 15 | } | |||
| 16 | ||||
| 17 | 2 | static int called_from_both(int which) | ||
| 18 | { | |||
| 19 |
2/2✓ Branch 0 (2→3) taken 1 times.
✓ Branch 1 (2→4) taken 1 times.
|
2/2✓ Fully covered.
|
2 | if (which == 0) { |
| 20 | 1 | return 1; | ||
| 21 | } | |||
| 22 | else { | |||
| 23 | 1 | return 0; | ||
| 24 | } | |||
| 25 | } | |||
| 26 | ||||
| 27 | #ifdef __cplusplus | |||
| 28 | } | |||
| 29 | #endif | |||
| 30 |