| Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/coreutils/src/gnulib/lib/xstrtol-error.c |
| Switch to Source code | Preprocessed file |
| Line | Source | Count | ||||||
|---|---|---|---|---|---|---|---|---|
| 1 | - | |||||||
| 2 | - | |||||||
| 3 | static void | - | ||||||
| 4 | xstrtol_error (enum strtol_error err, | - | ||||||
| 5 | int opt_idx, char c, struct option const *long_options, | - | ||||||
| 6 | char const *arg, | - | ||||||
| 7 | int exit_status) | - | ||||||
| 8 | { | - | ||||||
| 9 | char const *hyphens = "--"; | - | ||||||
| 10 | char const *msgid; | - | ||||||
| 11 | char const *option; | - | ||||||
| 12 | char option_buffer[2]; | - | ||||||
| 13 | - | |||||||
| 14 | switch (err) | - | ||||||
| 15 | { | - | ||||||
| 16 | default never executed: :default:never executed: default: | 0 | ||||||
| 17 | abort (); never executed: abort (); | 0 | ||||||
| 18 | - | |||||||
| 19 | case executed 22 times by 7 tests: case LONGINT_INVALID:Executed by:
code before this statement never executed: case LONGINT_INVALID:executed 22 times by 7 tests: LONGINT_INVALID:case LONGINT_INVALID:Executed by:
code before this statement never executed: case LONGINT_INVALID:executed 22 times by 7 tests: case LONGINT_INVALID:Executed by:
| 0-22 | ||||||
| 20 | msgid = "invalid %s%s argument '%s'"; | - | ||||||
| 21 | break; executed 22 times by 7 tests: break;Executed by:
| 22 | ||||||
| 22 | - | |||||||
| 23 | case never executed: LONGINT_INVALID_SUFFIX_CHAR:case LONGINT_INVALID_SUFFIX_CHAR:never executed: case LONGINT_INVALID_SUFFIX_CHAR: | 0 | ||||||
| 24 | case executed 1 time by 1 test: LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW:case LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW:Executed by:
executed 1 time by 1 test: case LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW:Executed by:
| 1 | ||||||
| 25 | msgid = "invalid suffix in %s%s argument '%s'"; | - | ||||||
| 26 | break; executed 1 time by 1 test: break;Executed by:
| 1 | ||||||
| 27 | - | |||||||
| 28 | case executed 1 time by 1 test: LONGINT_OVERFLOW:case LONGINT_OVERFLOW:Executed by:
executed 1 time by 1 test: case LONGINT_OVERFLOW:Executed by:
| 1 | ||||||
| 29 | msgid = "%s%s argument '%s' too large"; | - | ||||||
| 30 | break; executed 1 time by 1 test: break;Executed by:
| 1 | ||||||
| 31 | } | - | ||||||
| 32 | - | |||||||
| 33 | if (opt_idx < 0
| 7-17 | ||||||
| 34 | { | - | ||||||
| 35 | hyphens -= opt_idx; | - | ||||||
| 36 | option_buffer[0] = c; | - | ||||||
| 37 | option_buffer[1] = '\0'; | - | ||||||
| 38 | option = option_buffer; | - | ||||||
| 39 | } executed 7 times by 3 tests: end of blockExecuted by:
| 7 | ||||||
| 40 | else | - | ||||||
| 41 | option = long_options[opt_idx].name; executed 17 times by 7 tests: option = long_options[opt_idx].name;Executed by:
| 17 | ||||||
| 42 | - | |||||||
| 43 | error (exit_status, 0, | - | ||||||
| 44 | dcgettext (((void *)0), | - | ||||||
| 45 | msgid | - | ||||||
| 46 | , 5) | - | ||||||
| 47 | , hyphens, option, arg); | - | ||||||
| 48 | } never executed: end of block | 0 | ||||||
| 49 | - | |||||||
| 50 | - | |||||||
| 51 | - | |||||||
| 52 | void | - | ||||||
| 53 | xstrtol_fatal (enum strtol_error err, | - | ||||||
| 54 | int opt_idx, char c, struct option const *long_options, | - | ||||||
| 55 | char const *arg) | - | ||||||
| 56 | { | - | ||||||
| 57 | xstrtol_error (err, opt_idx, c, long_options, arg, exit_failure); | - | ||||||
| 58 | abort (); never executed: abort (); | 0 | ||||||
| 59 | } | - | ||||||
| Switch to Source code | Preprocessed file |