Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/coreutils/src/src/logname.c |
Switch to Source code | Preprocessed file |
Line | Source | Count | ||||||
---|---|---|---|---|---|---|---|---|
1 | - | |||||||
2 | - | |||||||
3 | - | |||||||
4 | - | |||||||
5 | - | |||||||
6 | - | |||||||
7 | - | |||||||
8 | - | |||||||
9 | static struct option const long_options[] = | - | ||||||
10 | { | - | ||||||
11 | { | - | ||||||
12 | ((void *)0) | - | ||||||
13 | , 0, | - | ||||||
14 | ((void *)0) | - | ||||||
15 | , 0} | - | ||||||
16 | }; | - | ||||||
17 | - | |||||||
18 | void | - | ||||||
19 | usage (int status) | - | ||||||
20 | { | - | ||||||
21 | if (status !=
| 3 | ||||||
22 | 0
| 3 | ||||||
23 | ) | - | ||||||
24 | do { fprintf ( | - | ||||||
25 | stderr | - | ||||||
26 | , | - | ||||||
27 | dcgettext (((void *)0), | - | ||||||
28 | "Try '%s --help' for more information.\n" | - | ||||||
29 | , 5) | - | ||||||
30 | , program_name); } executed 3 times by 1 test: while (0);end of block Executed by:
| 3 | ||||||
31 | else | - | ||||||
32 | { | - | ||||||
33 | printf ( | - | ||||||
34 | dcgettext (((void *)0), | - | ||||||
35 | "Usage: %s [OPTION]\n" | - | ||||||
36 | , 5) | - | ||||||
37 | , program_name); | - | ||||||
38 | fputs_unlocked ( | - | ||||||
39 | dcgettext (((void *)0), | - | ||||||
40 | "Print the name of the current user.\n\n" | - | ||||||
41 | , 5) | - | ||||||
42 | , | - | ||||||
43 | stdout | - | ||||||
44 | ) | - | ||||||
45 | - | |||||||
46 | - | |||||||
47 | ; | - | ||||||
48 | fputs_unlocked ( | - | ||||||
49 | dcgettext (((void *)0), | - | ||||||
50 | " --help display this help and exit\n" | - | ||||||
51 | , 5) | - | ||||||
52 | , | - | ||||||
53 | stdout | - | ||||||
54 | ); | - | ||||||
55 | fputs_unlocked ( | - | ||||||
56 | dcgettext (((void *)0), | - | ||||||
57 | " --version output version information and exit\n" | - | ||||||
58 | , 5) | - | ||||||
59 | , | - | ||||||
60 | stdout | - | ||||||
61 | ); | - | ||||||
62 | emit_ancillary_info ("logname"); | - | ||||||
63 | } executed 3 times by 1 test: end of block Executed by:
| 3 | ||||||
64 | exit (status); executed 6 times by 1 test: exit (status); Executed by:
| 6 | ||||||
65 | } | - | ||||||
66 | - | |||||||
67 | int | - | ||||||
68 | main (int argc, char **argv) | - | ||||||
69 | { | - | ||||||
70 | char *cp; | - | ||||||
71 | - | |||||||
72 | ; | - | ||||||
73 | set_program_name (argv[0]); | - | ||||||
74 | setlocale ( | - | ||||||
75 | 6 | - | ||||||
76 | , ""); | - | ||||||
77 | bindtextdomain ("coreutils", "/usr/local/share/locale"); | - | ||||||
78 | textdomain ("coreutils"); | - | ||||||
79 | - | |||||||
80 | atexit (close_stdout); | - | ||||||
81 | - | |||||||
82 | parse_long_options (argc, argv, "logname", "GNU coreutils", Version, | - | ||||||
83 | usage, ("FIXME: unknown"), (char const *) | - | ||||||
84 | ((void *)0) | - | ||||||
85 | ); | - | ||||||
86 | if (getopt_long (argc, argv, "", long_options,
| 0-3 | ||||||
87 | ((void *)0)
| 0-3 | ||||||
88 | ) != -1
| 0-3 | ||||||
89 | usage ( executed 3 times by 1 test: usage ( 1 ); Executed by:
| 3 | ||||||
90 | 1 executed 3 times by 1 test: usage ( 1 ); Executed by:
| 3 | ||||||
91 | ); executed 3 times by 1 test: usage ( 1 ); Executed by:
| 3 | ||||||
92 | - | |||||||
93 | if (optind < argc
| 0 | ||||||
94 | { | - | ||||||
95 | error (0, 0, | - | ||||||
96 | dcgettext (((void *)0), | - | ||||||
97 | "extra operand %s" | - | ||||||
98 | , 5) | - | ||||||
99 | , quote (argv[optind])); | - | ||||||
100 | usage ( | - | ||||||
101 | 1 | - | ||||||
102 | ); | - | ||||||
103 | } never executed: end of block | 0 | ||||||
104 | - | |||||||
105 | - | |||||||
106 | - | |||||||
107 | cp = getlogin (); | - | ||||||
108 | if (! cp
| 0 | ||||||
109 | (( never executed: !!sizeof (struct { _Static_assert (((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"no login name\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "no login name" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "no login name" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"no login name\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "no login name" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "no login name" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 | ||||||
110 | 1 never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"no login name\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "no login name" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "no login name" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 | ||||||
111 | , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"no login name\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"no login name\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "no login name" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "no login name" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 | ||||||
112 | 1 never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"no login name\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "no login name" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "no login name" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 | ||||||
113 | , 0, never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"no login name\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "no login name" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "no login name" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 | ||||||
114 | dcgettext (((void *)0), never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"no login name\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "no login name" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "no login name" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 | ||||||
115 | "no login name" never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"no login name\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "no login name" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "no login name" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 | ||||||
116 | , 5) never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"no login name\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "no login name" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "no login name" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 | ||||||
117 | ), (( never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"no login name\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "no login name" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "no login name" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 | ||||||
118 | 0 never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"no login name\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "no login name" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "no login name" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 | ||||||
119 | ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"no login name\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "no login name" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "no login name" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 | ||||||
120 | 1 never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"no login name\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "no login name" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "no login name" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 | ||||||
121 | , 0, never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"no login name\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "no login name" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "no login name" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 | ||||||
122 | dcgettext (((void *)0), never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"no login name\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "no login name" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "no login name" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 | ||||||
123 | "no login name" never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"no login name\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "no login name" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "no login name" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 | ||||||
124 | , 5) never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"no login name\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "no login name" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "no login name" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 | ||||||
125 | ), (( never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"no login name\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "no login name" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "no login name" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 | ||||||
126 | 0 never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"no login name\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "no login name" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "no login name" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 | ||||||
127 | ) ? (void) 0 : __builtin_unreachable ())))); never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"no login name\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "no login name" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "no login name" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 | ||||||
128 | - | |||||||
129 | puts (cp); | - | ||||||
130 | return never executed: return 0 ; never executed: return 0 ; | 0 | ||||||
131 | 0 never executed: return 0 ; | 0 | ||||||
132 | ; never executed: return 0 ; | 0 | ||||||
133 | } | - | ||||||
Switch to Source code | Preprocessed file |