OpenCoverage

stdbuf.c

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/coreutils/src/src/stdbuf.c
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5-
6-
7-
8-
9-
10static char *program_path;-
11-
12static struct-
13{-
14 size_t size;-
15 int optc;-
16 char *optarg;-
17} stdbuf[3];-
18-
19static struct option const longopts[] =-
20{-
21 {"input", -
22 1-
23 , -
24 ((void *)0)-
25 , 'i'},-
26 {"output", -
27 1-
28 , -
29 ((void *)0)-
30 , 'o'},-
31 {"error", -
32 1-
33 , -
34 ((void *)0)-
35 , 'e'},-
36 {"help", -
37 0-
38 , -
39 ((void *)0)-
40 , GETOPT_HELP_CHAR},-
41 {"version", -
42 0-
43 , -
44 ((void *)0)-
45 , GETOPT_VERSION_CHAR},-
46 {-
47 ((void *)0)-
48 , 0, -
49 ((void *)0)-
50 , 0}-
51};-
52-
53-
54-
55-
56-
57-
58-
59static int-
60parse_size (char const *str, size_t *size)-
61{-
62 uintmax_t tmp_size;-
63 enum strtol_error e = xstrtoumax (str, -
64 ((void *)0)-
65 , 10, &tmp_size, "EGkKMPTYZ0");-
66 if (e == LONGINT_OK
e == LONGINT_OKDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • stdbuf
FALSEevaluated 8 times by 1 test
Evaluated by:
  • stdbuf
&&
2-8
67 (
(1844674407370...UL) < tmp_sizeDescription
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • stdbuf
18446744073709551615UL)
(1844674407370...UL) < tmp_sizeDescription
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • stdbuf
0-2
68 < tmp_size
(1844674407370...UL) < tmp_sizeDescription
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • stdbuf
)
0-2
69 e = LONGINT_OVERFLOW;
never executed: e = LONGINT_OVERFLOW;
0
70-
71 if (e == LONGINT_OK
e == LONGINT_OKDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • stdbuf
FALSEevaluated 8 times by 1 test
Evaluated by:
  • stdbuf
)
2-8
72 {-
73 -
74 (*__errno_location ()) -
75 = 0;-
76 *size = tmp_size;-
77 return
executed 2 times by 1 test: return 0;
Executed by:
  • stdbuf
0;
executed 2 times by 1 test: return 0;
Executed by:
  • stdbuf
2
78 }-
79-
80 -
81 (*__errno_location ()) -
82 = (e == LONGINT_OVERFLOW ? -
83 75 -
84 : -
85 (*__errno_location ())-
86 );-
87 return
executed 8 times by 1 test: return -1;
Executed by:
  • stdbuf
-1;
executed 8 times by 1 test: return -1;
Executed by:
  • stdbuf
8
88}-
89-
90void-
91usage (int status)-
92{-
93 if (status !=
status != 0Description
TRUEevaluated 5 times by 1 test
Evaluated by:
  • stdbuf
FALSEevaluated 3 times by 1 test
Evaluated by:
  • stdbuf
3-5
94 0
status != 0Description
TRUEevaluated 5 times by 1 test
Evaluated by:
  • stdbuf
FALSEevaluated 3 times by 1 test
Evaluated by:
  • stdbuf
3-5
95 )-
96 do { fprintf (-
97 stderr-
98 , -
99 dcgettext (((void *)0), -
100 "Try '%s --help' for more information.\n"-
101 , 5)-
102 , program_name); }
executed 5 times by 1 test: end of block
Executed by:
  • stdbuf
while (0);
5
103 else-
104 {-
105 printf (-
106 dcgettext (((void *)0), -
107 "Usage: %s OPTION... COMMAND\n"-
108 , 5)-
109 , program_name);-
110 fputs_unlocked (-
111 dcgettext (((void *)0), -
112 "Run COMMAND, with modified buffering operations for its standard streams.\n"-
113 , 5)-
114 ,-
115 stdout-
116 )-
117-
118 ;-
119-
120 emit_mandatory_arg_note ();-
121-
122 fputs_unlocked (-
123 dcgettext (((void *)0), -
124 " -i, --input=MODE adjust standard input stream buffering\n -o, --output=MODE adjust standard output stream buffering\n -e, --error=MODE adjust standard error stream buffering\n"-
125 , 5)-
126 ,-
127 stdout-
128 )-
129-
130-
131-
132 ;-
133 fputs_unlocked (-
134 dcgettext (((void *)0), -
135 " --help display this help and exit\n"-
136 , 5)-
137 ,-
138 stdout-
139 );-
140 fputs_unlocked (-
141 dcgettext (((void *)0), -
142 " --version output version information and exit\n"-
143 , 5)-
144 ,-
145 stdout-
146 );-
147 fputs_unlocked (-
148 dcgettext (((void *)0), -
149 "\nIf MODE is 'L' the corresponding stream will be line buffered.\nThis option is invalid with standard input.\n"-
150 , 5)-
151 ,-
152 stdout-
153 )-
154-
155 ;-
156 fputs_unlocked (-
157 dcgettext (((void *)0), -
158 "\nIf MODE is '0' the corresponding stream will be unbuffered.\n"-
159 , 5)-
160 ,-
161 stdout-
162 )-
163-
164 ;-
165 fputs_unlocked (-
166 dcgettext (((void *)0), -
167 "\nOtherwise MODE is a number which may be followed by one of the following:\nKB 1000, K 1024, MB 1000*1000, M 1024*1024, and so on for G, T, P, E, Z, Y.\nIn this case the corresponding stream will be fully buffered with the buffer\nsize set to MODE bytes.\n"-
168 , 5)-
169 ,-
170 stdout-
171 )-
172-
173-
174-
175-
176 ;-
177 fputs_unlocked (-
178 dcgettext (((void *)0), -
179 "\nNOTE: If COMMAND adjusts the buffering of its standard streams ('tee' does\nfor example) then that will override corresponding changes by 'stdbuf'.\nAlso some filters (like 'dd' and 'cat' etc.) don't use streams for I/O,\nand are thus unaffected by 'stdbuf' settings.\n"-
180 , 5)-
181 ,-
182 stdout-
183 )-
184-
185-
186-
187-
188 ;-
189 emit_ancillary_info ("stdbuf");-
190 }
executed 3 times by 1 test: end of block
Executed by:
  • stdbuf
3
191 exit (status);
executed 8 times by 1 test: exit (status);
Executed by:
  • stdbuf
8
192}-
193-
194-
195-
196-
197-
198-
199-
200static void-
201set_program_path (const char *arg)-
202{-
203 if (-
204 (
(__extension__... arg , '/' )))Description
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • stdbuf
__extension__ (__builtin_constant_p (
__builtin_constant_p ( '/' )Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • stdbuf
FALSEnever evaluated
(__extension__... arg , '/' )))Description
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • stdbuf
0-2
205 '/'
__builtin_constant_p ( '/' )Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • stdbuf
FALSEnever evaluated
(__extension__... arg , '/' )))Description
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • stdbuf
0-2
206 )
__builtin_constant_p ( '/' )Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • stdbuf
FALSEnever evaluated
&& !__builtin_constant_p (
!__builtin_constant_p ( arg )Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • stdbuf
FALSEnever evaluated
(__extension__... arg , '/' )))Description
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • stdbuf
0-2
207 arg
!__builtin_constant_p ( arg )Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • stdbuf
FALSEnever evaluated
(__extension__... arg , '/' )))Description
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • stdbuf
0-2
208 )
!__builtin_constant_p ( arg )Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • stdbuf
FALSEnever evaluated
&& (
( '/' ) == '\0'Description
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • stdbuf
(__extension__... arg , '/' )))Description
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • stdbuf
0-2
209 '/'
( '/' ) == '\0'Description
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • stdbuf
(__extension__... arg , '/' )))Description
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • stdbuf
0-2
210 ) == '\0'
( '/' ) == '\0'Description
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • stdbuf
? (char *) __rawmemchr (
(__extension__... arg , '/' )))Description
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • stdbuf
0-2
211 arg
(__extension__... arg , '/' )))Description
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • stdbuf
0-2
212 ,
(__extension__... arg , '/' )))Description
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • stdbuf
0-2
213 '/'
(__extension__... arg , '/' )))Description
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • stdbuf
0-2
214 ) : __builtin_strchr (
(__extension__... arg , '/' )))Description
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • stdbuf
0-2
215 arg
(__extension__... arg , '/' )))Description
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • stdbuf
0-2
216 ,
(__extension__... arg , '/' )))Description
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • stdbuf
0-2
217 '/'
(__extension__... arg , '/' )))Description
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • stdbuf
0-2
218 )))
(__extension__... arg , '/' )))Description
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • stdbuf
0-2
219 )-
220 {-
221 program_path = dir_name (arg);-
222 }
never executed: end of block
0
223 else-
224 {-
225 char *path = xreadlink ("/proc/self/exe");-
226 if (path
pathDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • stdbuf
FALSEnever evaluated
)
0-2
227 program_path = dir_name (path);
executed 2 times by 1 test: program_path = dir_name (path);
Executed by:
  • stdbuf
2
228 else if ((
(path = getenv ("PATH"))Description
TRUEnever evaluated
FALSEnever evaluated
path = getenv ("PATH"))
(path = getenv ("PATH"))Description
TRUEnever evaluated
FALSEnever evaluated
)
0
229 {-
230 char *dir;-
231 path = xstrdup (path);-
232 for (dir = strtok (path, ":"); dir !=
dir != ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
233 ((void *)0)
dir != ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
234 ; dir = strtok (-
235 ((void *)0)-
236 , ":"))-
237 {-
238 char *candidate = file_name_concat (dir, arg, -
239 ((void *)0)-
240 );-
241 if (access (candidate,
access (candidate, 1 ) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
242 1
access (candidate, 1 ) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
243 ) == 0
access (candidate, 1 ) == 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
244 {-
245 program_path = dir_name (candidate);-
246 free (candidate);-
247 break;
never executed: break;
0
248 }-
249 free (candidate);-
250 }
never executed: end of block
0
251 }
never executed: end of block
0
252 free (path);-
253 }
executed 2 times by 1 test: end of block
Executed by:
  • stdbuf
2
254}-
255-
256static int-
257optc_to_fileno (int c)-
258{-
259 int ret = -1;-
260-
261 switch (c)-
262 {-
263 case
executed 2 times by 1 test: case 'e':
Executed by:
  • stdbuf
'e':
executed 2 times by 1 test: case 'e':
Executed by:
  • stdbuf
2
264 ret = -
265 2-
266 ;-
267 break;
executed 2 times by 1 test: break;
Executed by:
  • stdbuf
2
268 case
executed 3 times by 1 test: case 'i':
Executed by:
  • stdbuf
'i':
executed 3 times by 1 test: case 'i':
Executed by:
  • stdbuf
3
269 ret = -
270 0-
271 ;-
272 break;
executed 3 times by 1 test: break;
Executed by:
  • stdbuf
3
273 case
executed 6 times by 1 test: case 'o':
Executed by:
  • stdbuf
'o':
executed 6 times by 1 test: case 'o':
Executed by:
  • stdbuf
6
274 ret = -
275 1-
276 ;-
277 break;
executed 6 times by 1 test: break;
Executed by:
  • stdbuf
6
278 }-
279-
280 return
executed 11 times by 1 test: return ret;
Executed by:
  • stdbuf
ret;
executed 11 times by 1 test: return ret;
Executed by:
  • stdbuf
11
281}-
282-
283static void-
284set_LD_PRELOAD (void)-
285{-
286 int ret;-
287-
288-
289-
290 char const *preload_env = "LD_PRELOAD";-
291-
292 char *old_libs = getenv (preload_env);-
293 char *LD_PRELOAD;-
294 char const *const search_path[] = {-
295 program_path,-
296 "/usr/local/libexec/coreutils",-
297 -
298 ((void *)0)-
299 -
300 };-
301-
302 char const *const *path = search_path;-
303 char *libstdbuf;-
304-
305 while (-
306 1-
307 )-
308 {-
309 struct stat sb;-
310-
311 if (!**path
!**pathDescription
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • stdbuf
)
0-2
312 {-
313 libstdbuf = xstrdup ("libstdbuf.so");-
314 break;
never executed: break;
0
315 }-
316 ret = asprintf (&libstdbuf, "%s/%s", *path, "libstdbuf.so");-
317 if (ret < 0
ret < 0Description
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • stdbuf
)
0-2
318 xalloc_die ();
never executed: xalloc_die ();
0
319 if (stat (libstdbuf, &sb) == 0
stat (libstdbuf, &sb) == 0Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • stdbuf
FALSEnever evaluated
)
0-2
320 break;
executed 2 times by 1 test: break;
Executed by:
  • stdbuf
2
321 free (libstdbuf);-
322-
323 ++path;-
324 if ( ! *path
! *pathDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
325 ((
never executed: ((!!sizeof (struct { _Static_assert (EXIT_CANCELED, "verify_expr (" "EXIT_CANCELED" ", " "(error (EXIT_CANCELED, 0, dcgettext (((void *)0), \"failed to find %s\", 5), quote (\"libstdbuf.so\")), assume (false))" ")"); int _gl_dummy; })) ? ((error (EXIT_CAN... "failed to find %s" , 5) , quote ("libstdbuf.so")), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error (EXIT_CANCELED, 0, dcgettext (((void *)0), "failed to find %s" , 5) , quote ("libstdbuf.so")), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
!!sizeof (struct { _Static_assert (EXIT_CANCELED, "verify_expr (" "EXIT_CANCELED" ", " "(error (EXIT_CANCELED, 0, dcgettext (((void *)0), \"failed to find %s\", 5), quote (\"libstdbuf.so\")), assume (false))" ")"); int _gl_dummy; })) ? ((error (EXIT_CANCELED, 0,
never executed: ((!!sizeof (struct { _Static_assert (EXIT_CANCELED, "verify_expr (" "EXIT_CANCELED" ", " "(error (EXIT_CANCELED, 0, dcgettext (((void *)0), \"failed to find %s\", 5), quote (\"libstdbuf.so\")), assume (false))" ")"); int _gl_dummy; })) ? ((error (EXIT_CAN... "failed to find %s" , 5) , quote ("libstdbuf.so")), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error (EXIT_CANCELED, 0, dcgettext (((void *)0), "failed to find %s" , 5) , quote ("libstdbuf.so")), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
326 dcgettext (((void *)0),
never executed: ((!!sizeof (struct { _Static_assert (EXIT_CANCELED, "verify_expr (" "EXIT_CANCELED" ", " "(error (EXIT_CANCELED, 0, dcgettext (((void *)0), \"failed to find %s\", 5), quote (\"libstdbuf.so\")), assume (false))" ")"); int _gl_dummy; })) ? ((error (EXIT_CAN... "failed to find %s" , 5) , quote ("libstdbuf.so")), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error (EXIT_CANCELED, 0, dcgettext (((void *)0), "failed to find %s" , 5) , quote ("libstdbuf.so")), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
327 "failed to find %s"
never executed: ((!!sizeof (struct { _Static_assert (EXIT_CANCELED, "verify_expr (" "EXIT_CANCELED" ", " "(error (EXIT_CANCELED, 0, dcgettext (((void *)0), \"failed to find %s\", 5), quote (\"libstdbuf.so\")), assume (false))" ")"); int _gl_dummy; })) ? ((error (EXIT_CAN... "failed to find %s" , 5) , quote ("libstdbuf.so")), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error (EXIT_CANCELED, 0, dcgettext (((void *)0), "failed to find %s" , 5) , quote ("libstdbuf.so")), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
328 , 5)
never executed: ((!!sizeof (struct { _Static_assert (EXIT_CANCELED, "verify_expr (" "EXIT_CANCELED" ", " "(error (EXIT_CANCELED, 0, dcgettext (((void *)0), \"failed to find %s\", 5), quote (\"libstdbuf.so\")), assume (false))" ")"); int _gl_dummy; })) ? ((error (EXIT_CAN... "failed to find %s" , 5) , quote ("libstdbuf.so")), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error (EXIT_CANCELED, 0, dcgettext (((void *)0), "failed to find %s" , 5) , quote ("libstdbuf.so")), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
329 , quote ("libstdbuf.so")), ((
never executed: ((!!sizeof (struct { _Static_assert (EXIT_CANCELED, "verify_expr (" "EXIT_CANCELED" ", " "(error (EXIT_CANCELED, 0, dcgettext (((void *)0), \"failed to find %s\", 5), quote (\"libstdbuf.so\")), assume (false))" ")"); int _gl_dummy; })) ? ((error (EXIT_CAN... "failed to find %s" , 5) , quote ("libstdbuf.so")), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error (EXIT_CANCELED, 0, dcgettext (((void *)0), "failed to find %s" , 5) , quote ("libstdbuf.so")), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
330 0
never executed: ((!!sizeof (struct { _Static_assert (EXIT_CANCELED, "verify_expr (" "EXIT_CANCELED" ", " "(error (EXIT_CANCELED, 0, dcgettext (((void *)0), \"failed to find %s\", 5), quote (\"libstdbuf.so\")), assume (false))" ")"); int _gl_dummy; })) ? ((error (EXIT_CAN... "failed to find %s" , 5) , quote ("libstdbuf.so")), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error (EXIT_CANCELED, 0, dcgettext (((void *)0), "failed to find %s" , 5) , quote ("libstdbuf.so")), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
331 ) ? (void) 0 : __builtin_unreachable ()))) : ((error (EXIT_CANCELED, 0,
never executed: ((!!sizeof (struct { _Static_assert (EXIT_CANCELED, "verify_expr (" "EXIT_CANCELED" ", " "(error (EXIT_CANCELED, 0, dcgettext (((void *)0), \"failed to find %s\", 5), quote (\"libstdbuf.so\")), assume (false))" ")"); int _gl_dummy; })) ? ((error (EXIT_CAN... "failed to find %s" , 5) , quote ("libstdbuf.so")), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error (EXIT_CANCELED, 0, dcgettext (((void *)0), "failed to find %s" , 5) , quote ("libstdbuf.so")), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
332 dcgettext (((void *)0),
never executed: ((!!sizeof (struct { _Static_assert (EXIT_CANCELED, "verify_expr (" "EXIT_CANCELED" ", " "(error (EXIT_CANCELED, 0, dcgettext (((void *)0), \"failed to find %s\", 5), quote (\"libstdbuf.so\")), assume (false))" ")"); int _gl_dummy; })) ? ((error (EXIT_CAN... "failed to find %s" , 5) , quote ("libstdbuf.so")), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error (EXIT_CANCELED, 0, dcgettext (((void *)0), "failed to find %s" , 5) , quote ("libstdbuf.so")), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
333 "failed to find %s"
never executed: ((!!sizeof (struct { _Static_assert (EXIT_CANCELED, "verify_expr (" "EXIT_CANCELED" ", " "(error (EXIT_CANCELED, 0, dcgettext (((void *)0), \"failed to find %s\", 5), quote (\"libstdbuf.so\")), assume (false))" ")"); int _gl_dummy; })) ? ((error (EXIT_CAN... "failed to find %s" , 5) , quote ("libstdbuf.so")), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error (EXIT_CANCELED, 0, dcgettext (((void *)0), "failed to find %s" , 5) , quote ("libstdbuf.so")), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
334 , 5)
never executed: ((!!sizeof (struct { _Static_assert (EXIT_CANCELED, "verify_expr (" "EXIT_CANCELED" ", " "(error (EXIT_CANCELED, 0, dcgettext (((void *)0), \"failed to find %s\", 5), quote (\"libstdbuf.so\")), assume (false))" ")"); int _gl_dummy; })) ? ((error (EXIT_CAN... "failed to find %s" , 5) , quote ("libstdbuf.so")), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error (EXIT_CANCELED, 0, dcgettext (((void *)0), "failed to find %s" , 5) , quote ("libstdbuf.so")), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
335 , quote ("libstdbuf.so")), ((
never executed: ((!!sizeof (struct { _Static_assert (EXIT_CANCELED, "verify_expr (" "EXIT_CANCELED" ", " "(error (EXIT_CANCELED, 0, dcgettext (((void *)0), \"failed to find %s\", 5), quote (\"libstdbuf.so\")), assume (false))" ")"); int _gl_dummy; })) ? ((error (EXIT_CAN... "failed to find %s" , 5) , quote ("libstdbuf.so")), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error (EXIT_CANCELED, 0, dcgettext (((void *)0), "failed to find %s" , 5) , quote ("libstdbuf.so")), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
336 0
never executed: ((!!sizeof (struct { _Static_assert (EXIT_CANCELED, "verify_expr (" "EXIT_CANCELED" ", " "(error (EXIT_CANCELED, 0, dcgettext (((void *)0), \"failed to find %s\", 5), quote (\"libstdbuf.so\")), assume (false))" ")"); int _gl_dummy; })) ? ((error (EXIT_CAN... "failed to find %s" , 5) , quote ("libstdbuf.so")), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error (EXIT_CANCELED, 0, dcgettext (((void *)0), "failed to find %s" , 5) , quote ("libstdbuf.so")), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
337 ) ? (void) 0 : __builtin_unreachable ()))));
never executed: ((!!sizeof (struct { _Static_assert (EXIT_CANCELED, "verify_expr (" "EXIT_CANCELED" ", " "(error (EXIT_CANCELED, 0, dcgettext (((void *)0), \"failed to find %s\", 5), quote (\"libstdbuf.so\")), assume (false))" ")"); int _gl_dummy; })) ? ((error (EXIT_CAN... "failed to find %s" , 5) , quote ("libstdbuf.so")), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error (EXIT_CANCELED, 0, dcgettext (((void *)0), "failed to find %s" , 5) , quote ("libstdbuf.so")), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
338 }
never executed: end of block
0
339-
340-
341-
342 if (old_libs
old_libsDescription
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • stdbuf
)
0-2
343 ret = asprintf (&LD_PRELOAD, "%s=%s:%s", preload_env, old_libs, libstdbuf);
never executed: ret = asprintf (&LD_PRELOAD, "%s=%s:%s", preload_env, old_libs, libstdbuf);
0
344 else-
345 ret = asprintf (&LD_PRELOAD, "%s=%s", preload_env, libstdbuf);
executed 2 times by 1 test: ret = asprintf (&LD_PRELOAD, "%s=%s", preload_env, libstdbuf);
Executed by:
  • stdbuf
2
346-
347 if (ret < 0
ret < 0Description
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • stdbuf
)
0-2
348 xalloc_die ();
never executed: xalloc_die ();
0
349-
350 free (libstdbuf);-
351-
352 ret = putenv (LD_PRELOAD);-
353-
354-
355-
356-
357-
358 if (ret != 0
ret != 0Description
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • stdbuf
)
0-2
359 {-
360 ((!!sizeof (struct { _Static_assert (EXIT_CANCELED, "verify_expr (" "EXIT_CANCELED" ", " "(error (EXIT_CANCELED, (*__errno_location ()), dcgettext (((void *)0), \"failed to update the environment with %s\", 5), quote (LD_PRELOAD)), assume (false))" ")"); int _gl_dummy; })) ? ((error (EXIT_CANCELED, -
361 (*__errno_location ())-
362 , -
363 dcgettext (((void *)0), -
364 "failed to update the environment with %s"-
365 , 5)-
366 , quote (LD_PRELOAD)), ((-
367 0-
368 ) ? (void) 0 : __builtin_unreachable ()))) : ((error (EXIT_CANCELED, -
369 (*__errno_location ())-
370 , -
371 dcgettext (((void *)0), -
372 "failed to update the environment with %s"-
373 , 5)-
374 , quote (LD_PRELOAD)), ((-
375 0-
376 ) ? (void) 0 : __builtin_unreachable ()))))-
377-
378 ;-
379 }
never executed: end of block
0
380}
executed 2 times by 1 test: end of block
Executed by:
  • stdbuf
2
381-
382-
383-
384-
385static -
386 _Bool-
387-
388set_libstdbuf_options (void)-
389{-
390 -
391 _Bool -
392 env_set = -
393 0-
394 ;-
395-
396 for (size_t i = 0; i < (sizeof (stdbuf) / sizeof *(stdbuf))
i < (sizeof (s...eof *(stdbuf))Description
TRUEevaluated 9 times by 1 test
Evaluated by:
  • stdbuf
FALSEevaluated 3 times by 1 test
Evaluated by:
  • stdbuf
; i++)
3-9
397 {-
398 if (stdbuf[i].optarg
stdbuf[i].optargDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • stdbuf
FALSEevaluated 7 times by 1 test
Evaluated by:
  • stdbuf
)
2-7
399 {-
400 char *var;-
401 int ret;-
402-
403 if (*
*stdbuf[i].optarg == 'L'Description
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • stdbuf
stdbuf[i].optarg == 'L'
*stdbuf[i].optarg == 'L'Description
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • stdbuf
)
0-2
404 ret = asprintf (&var, "%s%c=L", "_STDBUF_",
never executed: ret = asprintf (&var, "%s%c=L", "_STDBUF_", (__extension__ ({ int __res; if (sizeof ( stdbuf[i].optc ) > 1) { if (__builtin_constant_p ( stdbuf[i].optc )) { int __c = ( stdbuf[i].optc ); __res = __c < -128 || __c > 255 ? __c : (*__ctype_toupper_loc ())[__c]; } else __res = toupper ( stdbuf[i].optc ); } else __res = (*__ctype_toupper_loc ())[(int) ( stdbuf[i].optc )]; __res; })) );
0
405
never executed: ret = asprintf (&var, "%s%c=L", "_STDBUF_", (__extension__ ({ int __res; if (sizeof ( stdbuf[i].optc ) > 1) { if (__builtin_constant_p ( stdbuf[i].optc )) { int __c = ( stdbuf[i].optc ); __res = __c < -128 || __c > 255 ? __c : (*__ctype_toupper_loc ())[__c]; } else __res = toupper ( stdbuf[i].optc ); } else __res = (*__ctype_toupper_loc ())[(int) ( stdbuf[i].optc )]; __res; })) );
0
406 (__extension__ ({ int __res; if (sizeof (
sizeof ( stdbuf[i].optc ) > 1Description
TRUEnever evaluated
FALSEnever evaluated
never executed: ret = asprintf (&var, "%s%c=L", "_STDBUF_", (__extension__ ({ int __res; if (sizeof ( stdbuf[i].optc ) > 1) { if (__builtin_constant_p ( stdbuf[i].optc )) { int __c = ( stdbuf[i].optc ); __res = __c < -128 || __c > 255 ? __c : (*__ctype_toupper_loc ())[__c]; } else __res = toupper ( stdbuf[i].optc ); } else __res = (*__ctype_toupper_loc ())[(int) ( stdbuf[i].optc )]; __res; })) );
0
407 stdbuf[i].optc
sizeof ( stdbuf[i].optc ) > 1Description
TRUEnever evaluated
FALSEnever evaluated
never executed: ret = asprintf (&var, "%s%c=L", "_STDBUF_", (__extension__ ({ int __res; if (sizeof ( stdbuf[i].optc ) > 1) { if (__builtin_constant_p ( stdbuf[i].optc )) { int __c = ( stdbuf[i].optc ); __res = __c < -128 || __c > 255 ? __c : (*__ctype_toupper_loc ())[__c]; } else __res = toupper ( stdbuf[i].optc ); } else __res = (*__ctype_toupper_loc ())[(int) ( stdbuf[i].optc )]; __res; })) );
0
408 ) > 1
sizeof ( stdbuf[i].optc ) > 1Description
TRUEnever evaluated
FALSEnever evaluated
) { if (__builtin_constant_p (
__builtin_cons...dbuf[i].optc )Description
TRUEnever evaluated
FALSEnever evaluated
never executed: ret = asprintf (&var, "%s%c=L", "_STDBUF_", (__extension__ ({ int __res; if (sizeof ( stdbuf[i].optc ) > 1) { if (__builtin_constant_p ( stdbuf[i].optc )) { int __c = ( stdbuf[i].optc ); __res = __c < -128 || __c > 255 ? __c : (*__ctype_toupper_loc ())[__c]; } else __res = toupper ( stdbuf[i].optc ); } else __res = (*__ctype_toupper_loc ())[(int) ( stdbuf[i].optc )]; __res; })) );
0
409 stdbuf[i].optc
__builtin_cons...dbuf[i].optc )Description
TRUEnever evaluated
FALSEnever evaluated
never executed: ret = asprintf (&var, "%s%c=L", "_STDBUF_", (__extension__ ({ int __res; if (sizeof ( stdbuf[i].optc ) > 1) { if (__builtin_constant_p ( stdbuf[i].optc )) { int __c = ( stdbuf[i].optc ); __res = __c < -128 || __c > 255 ? __c : (*__ctype_toupper_loc ())[__c]; } else __res = toupper ( stdbuf[i].optc ); } else __res = (*__ctype_toupper_loc ())[(int) ( stdbuf[i].optc )]; __res; })) );
0
410 )
__builtin_cons...dbuf[i].optc )Description
TRUEnever evaluated
FALSEnever evaluated
) { int __c = (
never executed: ret = asprintf (&var, "%s%c=L", "_STDBUF_", (__extension__ ({ int __res; if (sizeof ( stdbuf[i].optc ) > 1) { if (__builtin_constant_p ( stdbuf[i].optc )) { int __c = ( stdbuf[i].optc ); __res = __c < -128 || __c > 255 ? __c : (*__ctype_toupper_loc ())[__c]; } else __res = toupper ( stdbuf[i].optc ); } else __res = (*__ctype_toupper_loc ())[(int) ( stdbuf[i].optc )]; __res; })) );
0
411 stdbuf[i].optc
never executed: ret = asprintf (&var, "%s%c=L", "_STDBUF_", (__extension__ ({ int __res; if (sizeof ( stdbuf[i].optc ) > 1) { if (__builtin_constant_p ( stdbuf[i].optc )) { int __c = ( stdbuf[i].optc ); __res = __c < -128 || __c > 255 ? __c : (*__ctype_toupper_loc ())[__c]; } else __res = toupper ( stdbuf[i].optc ); } else __res = (*__ctype_toupper_loc ())[(int) ( stdbuf[i].optc )]; __res; })) );
0
412 ); __res = __c < -128
__c < -128Description
TRUEnever evaluated
FALSEnever evaluated
|| __c > 255
__c > 255Description
TRUEnever evaluated
FALSEnever evaluated
? __c : (*__ctype_toupper_loc ())[__c]; }
never executed: end of block
else __res = toupper (
never executed: __res = toupper ( stdbuf[i].optc );
never executed: ret = asprintf (&var, "%s%c=L", "_STDBUF_", (__extension__ ({ int __res; if (sizeof ( stdbuf[i].optc ) > 1) { if (__builtin_constant_p ( stdbuf[i].optc )) { int __c = ( stdbuf[i].optc ); __res = __c < -128 || __c > 255 ? __c : (*__ctype_toupper_loc ())[__c]; } else __res = toupper ( stdbuf[i].optc ); } else __res = (*__ctype_toupper_loc ())[(int) ( stdbuf[i].optc )]; __res; })) );
0
413 stdbuf[i].optc
never executed: __res = toupper ( stdbuf[i].optc );
never executed: ret = asprintf (&var, "%s%c=L", "_STDBUF_", (__extension__ ({ int __res; if (sizeof ( stdbuf[i].optc ) > 1) { if (__builtin_constant_p ( stdbuf[i].optc )) { int __c = ( stdbuf[i].optc ); __res = __c < -128 || __c > 255 ? __c : (*__ctype_toupper_loc ())[__c]; } else __res = toupper ( stdbuf[i].optc ); } else __res = (*__ctype_toupper_loc ())[(int) ( stdbuf[i].optc )]; __res; })) );
0
414 );
never executed: __res = toupper ( stdbuf[i].optc );
} else __res = (*__ctype_toupper_loc ())[(int) (
never executed: __res = (*__ctype_toupper_loc ())[(int) ( stdbuf[i].optc )];
never executed: ret = asprintf (&var, "%s%c=L", "_STDBUF_", (__extension__ ({ int __res; if (sizeof ( stdbuf[i].optc ) > 1) { if (__builtin_constant_p ( stdbuf[i].optc )) { int __c = ( stdbuf[i].optc ); __res = __c < -128 || __c > 255 ? __c : (*__ctype_toupper_loc ())[__c]; } else __res = toupper ( stdbuf[i].optc ); } else __res = (*__ctype_toupper_loc ())[(int) ( stdbuf[i].optc )]; __res; })) );
0
415 stdbuf[i].optc
never executed: __res = (*__ctype_toupper_loc ())[(int) ( stdbuf[i].optc )];
never executed: ret = asprintf (&var, "%s%c=L", "_STDBUF_", (__extension__ ({ int __res; if (sizeof ( stdbuf[i].optc ) > 1) { if (__builtin_constant_p ( stdbuf[i].optc )) { int __c = ( stdbuf[i].optc ); __res = __c < -128 || __c > 255 ? __c : (*__ctype_toupper_loc ())[__c]; } else __res = toupper ( stdbuf[i].optc ); } else __res = (*__ctype_toupper_loc ())[(int) ( stdbuf[i].optc )]; __res; })) );
0
416 )];
never executed: __res = (*__ctype_toupper_loc ())[(int) ( stdbuf[i].optc )];
__res; }))
never executed: ret = asprintf (&var, "%s%c=L", "_STDBUF_", (__extension__ ({ int __res; if (sizeof ( stdbuf[i].optc ) > 1) { if (__builtin_constant_p ( stdbuf[i].optc )) { int __c = ( stdbuf[i].optc ); __res = __c < -128 || __c > 255 ? __c : (*__ctype_toupper_loc ())[__c]; } else __res = toupper ( stdbuf[i].optc ); } else __res = (*__ctype_toupper_loc ())[(int) ( stdbuf[i].optc )]; __res; })) );
0
417 );
never executed: ret = asprintf (&var, "%s%c=L", "_STDBUF_", (__extension__ ({ int __res; if (sizeof ( stdbuf[i].optc ) > 1) { if (__builtin_constant_p ( stdbuf[i].optc )) { int __c = ( stdbuf[i].optc ); __res = __c < -128 || __c > 255 ? __c : (*__ctype_toupper_loc ())[__c]; } else __res = toupper ( stdbuf[i].optc ); } else __res = (*__ctype_toupper_loc ())[(int) ( stdbuf[i].optc )]; __res; })) );
0
418 else-
419 ret = asprintf (&var, "%s%c=%"
executed 2 times by 1 test: ret = asprintf (&var, "%s%c=%" "l" "u" , "_STDBUF_", (__extension__ ({ int __res; if (sizeof ( stdbuf[i].optc ) > 1) { if (__builtin_constant_p ( stdbuf[i].optc )) { int __c = ( stdbuf[i].optc ); __res = __c < -128 || __c > 255 ? __c : (*__ctype_toupper_loc ())[__c]; } else __res = toupper ( stdbuf[i].optc ); } else __res = (*__ctype_toupper_loc ())[(int) ( stdbuf[i].optc )]; __res; })) , (uintmax_t) stdbuf[i].size);
Executed by:
  • stdbuf
2
420 "l" "u"
executed 2 times by 1 test: ret = asprintf (&var, "%s%c=%" "l" "u" , "_STDBUF_", (__extension__ ({ int __res; if (sizeof ( stdbuf[i].optc ) > 1) { if (__builtin_constant_p ( stdbuf[i].optc )) { int __c = ( stdbuf[i].optc ); __res = __c < -128 || __c > 255 ? __c : (*__ctype_toupper_loc ())[__c]; } else __res = toupper ( stdbuf[i].optc ); } else __res = (*__ctype_toupper_loc ())[(int) ( stdbuf[i].optc )]; __res; })) , (uintmax_t) stdbuf[i].size);
Executed by:
  • stdbuf
2
421 , "_STDBUF_",
executed 2 times by 1 test: ret = asprintf (&var, "%s%c=%" "l" "u" , "_STDBUF_", (__extension__ ({ int __res; if (sizeof ( stdbuf[i].optc ) > 1) { if (__builtin_constant_p ( stdbuf[i].optc )) { int __c = ( stdbuf[i].optc ); __res = __c < -128 || __c > 255 ? __c : (*__ctype_toupper_loc ())[__c]; } else __res = toupper ( stdbuf[i].optc ); } else __res = (*__ctype_toupper_loc ())[(int) ( stdbuf[i].optc )]; __res; })) , (uintmax_t) stdbuf[i].size);
Executed by:
  • stdbuf
2
422
executed 2 times by 1 test: ret = asprintf (&var, "%s%c=%" "l" "u" , "_STDBUF_", (__extension__ ({ int __res; if (sizeof ( stdbuf[i].optc ) > 1) { if (__builtin_constant_p ( stdbuf[i].optc )) { int __c = ( stdbuf[i].optc ); __res = __c < -128 || __c > 255 ? __c : (*__ctype_toupper_loc ())[__c]; } else __res = toupper ( stdbuf[i].optc ); } else __res = (*__ctype_toupper_loc ())[(int) ( stdbuf[i].optc )]; __res; })) , (uintmax_t) stdbuf[i].size);
Executed by:
  • stdbuf
2
423 (__extension__ ({ int __res; if (sizeof (
sizeof ( stdbuf[i].optc ) > 1Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • stdbuf
FALSEnever evaluated
executed 2 times by 1 test: ret = asprintf (&var, "%s%c=%" "l" "u" , "_STDBUF_", (__extension__ ({ int __res; if (sizeof ( stdbuf[i].optc ) > 1) { if (__builtin_constant_p ( stdbuf[i].optc )) { int __c = ( stdbuf[i].optc ); __res = __c < -128 || __c > 255 ? __c : (*__ctype_toupper_loc ())[__c]; } else __res = toupper ( stdbuf[i].optc ); } else __res = (*__ctype_toupper_loc ())[(int) ( stdbuf[i].optc )]; __res; })) , (uintmax_t) stdbuf[i].size);
Executed by:
  • stdbuf
0-2
424 stdbuf[i].optc
sizeof ( stdbuf[i].optc ) > 1Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • stdbuf
FALSEnever evaluated
executed 2 times by 1 test: ret = asprintf (&var, "%s%c=%" "l" "u" , "_STDBUF_", (__extension__ ({ int __res; if (sizeof ( stdbuf[i].optc ) > 1) { if (__builtin_constant_p ( stdbuf[i].optc )) { int __c = ( stdbuf[i].optc ); __res = __c < -128 || __c > 255 ? __c : (*__ctype_toupper_loc ())[__c]; } else __res = toupper ( stdbuf[i].optc ); } else __res = (*__ctype_toupper_loc ())[(int) ( stdbuf[i].optc )]; __res; })) , (uintmax_t) stdbuf[i].size);
Executed by:
  • stdbuf
0-2
425 ) > 1
sizeof ( stdbuf[i].optc ) > 1Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • stdbuf
FALSEnever evaluated
) { if (__builtin_constant_p (
__builtin_cons...dbuf[i].optc )Description
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • stdbuf
executed 2 times by 1 test: ret = asprintf (&var, "%s%c=%" "l" "u" , "_STDBUF_", (__extension__ ({ int __res; if (sizeof ( stdbuf[i].optc ) > 1) { if (__builtin_constant_p ( stdbuf[i].optc )) { int __c = ( stdbuf[i].optc ); __res = __c < -128 || __c > 255 ? __c : (*__ctype_toupper_loc ())[__c]; } else __res = toupper ( stdbuf[i].optc ); } else __res = (*__ctype_toupper_loc ())[(int) ( stdbuf[i].optc )]; __res; })) , (uintmax_t) stdbuf[i].size);
Executed by:
  • stdbuf
0-2
426 stdbuf[i].optc
__builtin_cons...dbuf[i].optc )Description
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • stdbuf
executed 2 times by 1 test: ret = asprintf (&var, "%s%c=%" "l" "u" , "_STDBUF_", (__extension__ ({ int __res; if (sizeof ( stdbuf[i].optc ) > 1) { if (__builtin_constant_p ( stdbuf[i].optc )) { int __c = ( stdbuf[i].optc ); __res = __c < -128 || __c > 255 ? __c : (*__ctype_toupper_loc ())[__c]; } else __res = toupper ( stdbuf[i].optc ); } else __res = (*__ctype_toupper_loc ())[(int) ( stdbuf[i].optc )]; __res; })) , (uintmax_t) stdbuf[i].size);
Executed by:
  • stdbuf
0-2
427 )
__builtin_cons...dbuf[i].optc )Description
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • stdbuf
) { int __c = (
executed 2 times by 1 test: ret = asprintf (&var, "%s%c=%" "l" "u" , "_STDBUF_", (__extension__ ({ int __res; if (sizeof ( stdbuf[i].optc ) > 1) { if (__builtin_constant_p ( stdbuf[i].optc )) { int __c = ( stdbuf[i].optc ); __res = __c < -128 || __c > 255 ? __c : (*__ctype_toupper_loc ())[__c]; } else __res = toupper ( stdbuf[i].optc ); } else __res = (*__ctype_toupper_loc ())[(int) ( stdbuf[i].optc )]; __res; })) , (uintmax_t) stdbuf[i].size);
Executed by:
  • stdbuf
0-2
428 stdbuf[i].optc
executed 2 times by 1 test: ret = asprintf (&var, "%s%c=%" "l" "u" , "_STDBUF_", (__extension__ ({ int __res; if (sizeof ( stdbuf[i].optc ) > 1) { if (__builtin_constant_p ( stdbuf[i].optc )) { int __c = ( stdbuf[i].optc ); __res = __c < -128 || __c > 255 ? __c : (*__ctype_toupper_loc ())[__c]; } else __res = toupper ( stdbuf[i].optc ); } else __res = (*__ctype_toupper_loc ())[(int) ( stdbuf[i].optc )]; __res; })) , (uintmax_t) stdbuf[i].size);
Executed by:
  • stdbuf
2
429 ); __res = __c < -128
__c < -128Description
TRUEnever evaluated
FALSEnever evaluated
|| __c > 255
__c > 255Description
TRUEnever evaluated
FALSEnever evaluated
? __c : (*__ctype_toupper_loc ())[__c]; }
never executed: end of block
else __res = toupper (
executed 2 times by 1 test: __res = toupper ( stdbuf[i].optc );
Executed by:
  • stdbuf
executed 2 times by 1 test: ret = asprintf (&var, "%s%c=%" "l" "u" , "_STDBUF_", (__extension__ ({ int __res; if (sizeof ( stdbuf[i].optc ) > 1) { if (__builtin_constant_p ( stdbuf[i].optc )) { int __c = ( stdbuf[i].optc ); __res = __c < -128 || __c > 255 ? __c : (*__ctype_toupper_loc ())[__c]; } else __res = toupper ( stdbuf[i].optc ); } else __res = (*__ctype_toupper_loc ())[(int) ( stdbuf[i].optc )]; __res; })) , (uintmax_t) stdbuf[i].size);
Executed by:
  • stdbuf
0-2
430 stdbuf[i].optc
executed 2 times by 1 test: __res = toupper ( stdbuf[i].optc );
Executed by:
  • stdbuf
executed 2 times by 1 test: ret = asprintf (&var, "%s%c=%" "l" "u" , "_STDBUF_", (__extension__ ({ int __res; if (sizeof ( stdbuf[i].optc ) > 1) { if (__builtin_constant_p ( stdbuf[i].optc )) { int __c = ( stdbuf[i].optc ); __res = __c < -128 || __c > 255 ? __c : (*__ctype_toupper_loc ())[__c]; } else __res = toupper ( stdbuf[i].optc ); } else __res = (*__ctype_toupper_loc ())[(int) ( stdbuf[i].optc )]; __res; })) , (uintmax_t) stdbuf[i].size);
Executed by:
  • stdbuf
2
431 );
executed 2 times by 1 test: __res = toupper ( stdbuf[i].optc );
Executed by:
  • stdbuf
} else __res = (*__ctype_toupper_loc ())[(int) (
never executed: __res = (*__ctype_toupper_loc ())[(int) ( stdbuf[i].optc )];
executed 2 times by 1 test: ret = asprintf (&var, "%s%c=%" "l" "u" , "_STDBUF_", (__extension__ ({ int __res; if (sizeof ( stdbuf[i].optc ) > 1) { if (__builtin_constant_p ( stdbuf[i].optc )) { int __c = ( stdbuf[i].optc ); __res = __c < -128 || __c > 255 ? __c : (*__ctype_toupper_loc ())[__c]; } else __res = toupper ( stdbuf[i].optc ); } else __res = (*__ctype_toupper_loc ())[(int) ( stdbuf[i].optc )]; __res; })) , (uintmax_t) stdbuf[i].size);
Executed by:
  • stdbuf
0-2
432 stdbuf[i].optc
never executed: __res = (*__ctype_toupper_loc ())[(int) ( stdbuf[i].optc )];
executed 2 times by 1 test: ret = asprintf (&var, "%s%c=%" "l" "u" , "_STDBUF_", (__extension__ ({ int __res; if (sizeof ( stdbuf[i].optc ) > 1) { if (__builtin_constant_p ( stdbuf[i].optc )) { int __c = ( stdbuf[i].optc ); __res = __c < -128 || __c > 255 ? __c : (*__ctype_toupper_loc ())[__c]; } else __res = toupper ( stdbuf[i].optc ); } else __res = (*__ctype_toupper_loc ())[(int) ( stdbuf[i].optc )]; __res; })) , (uintmax_t) stdbuf[i].size);
Executed by:
  • stdbuf
0-2
433 )];
never executed: __res = (*__ctype_toupper_loc ())[(int) ( stdbuf[i].optc )];
__res; }))
executed 2 times by 1 test: ret = asprintf (&var, "%s%c=%" "l" "u" , "_STDBUF_", (__extension__ ({ int __res; if (sizeof ( stdbuf[i].optc ) > 1) { if (__builtin_constant_p ( stdbuf[i].optc )) { int __c = ( stdbuf[i].optc ); __res = __c < -128 || __c > 255 ? __c : (*__ctype_toupper_loc ())[__c]; } else __res = toupper ( stdbuf[i].optc ); } else __res = (*__ctype_toupper_loc ())[(int) ( stdbuf[i].optc )]; __res; })) , (uintmax_t) stdbuf[i].size);
Executed by:
  • stdbuf
0-2
434 ,
executed 2 times by 1 test: ret = asprintf (&var, "%s%c=%" "l" "u" , "_STDBUF_", (__extension__ ({ int __res; if (sizeof ( stdbuf[i].optc ) > 1) { if (__builtin_constant_p ( stdbuf[i].optc )) { int __c = ( stdbuf[i].optc ); __res = __c < -128 || __c > 255 ? __c : (*__ctype_toupper_loc ())[__c]; } else __res = toupper ( stdbuf[i].optc ); } else __res = (*__ctype_toupper_loc ())[(int) ( stdbuf[i].optc )]; __res; })) , (uintmax_t) stdbuf[i].size);
Executed by:
  • stdbuf
2
435 (uintmax_t) stdbuf[i].size);
executed 2 times by 1 test: ret = asprintf (&var, "%s%c=%" "l" "u" , "_STDBUF_", (__extension__ ({ int __res; if (sizeof ( stdbuf[i].optc ) > 1) { if (__builtin_constant_p ( stdbuf[i].optc )) { int __c = ( stdbuf[i].optc ); __res = __c < -128 || __c > 255 ? __c : (*__ctype_toupper_loc ())[__c]; } else __res = toupper ( stdbuf[i].optc ); } else __res = (*__ctype_toupper_loc ())[(int) ( stdbuf[i].optc )]; __res; })) , (uintmax_t) stdbuf[i].size);
Executed by:
  • stdbuf
2
436 if (ret < 0
ret < 0Description
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • stdbuf
)
0-2
437 xalloc_die ();
never executed: xalloc_die ();
0
438-
439 if (putenv (var) != 0
putenv (var) != 0Description
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • stdbuf
)
0-2
440 {-
441 ((!!sizeof (struct { _Static_assert (EXIT_CANCELED, "verify_expr (" "EXIT_CANCELED" ", " "(error (EXIT_CANCELED, (*__errno_location ()), dcgettext (((void *)0), \"failed to update the environment with %s\", 5), quote (var)), assume (false))" ")"); int _gl_dummy; })) ? ((error (EXIT_CANCELED, -
442 (*__errno_location ())-
443 , -
444 dcgettext (((void *)0), -
445 "failed to update the environment with %s"-
446 , 5)-
447 , quote (var)), ((-
448 0-
449 ) ? (void) 0 : __builtin_unreachable ()))) : ((error (EXIT_CANCELED, -
450 (*__errno_location ())-
451 , -
452 dcgettext (((void *)0), -
453 "failed to update the environment with %s"-
454 , 5)-
455 , quote (var)), ((-
456 0-
457 ) ? (void) 0 : __builtin_unreachable ()))))-
458-
459 ;-
460 }
never executed: end of block
0
461-
462 env_set = -
463 1-
464 ;-
465 }
executed 2 times by 1 test: end of block
Executed by:
  • stdbuf
2
466 }
executed 9 times by 1 test: end of block
Executed by:
  • stdbuf
9
467-
468 return
executed 3 times by 1 test: return env_set;
Executed by:
  • stdbuf
env_set;
executed 3 times by 1 test: return env_set;
Executed by:
  • stdbuf
3
469}-
470-
471int-
472main (int argc, char **argv)-
473{-
474 int c;-
475-
476 ;-
477 set_program_name (argv[0]);-
478 setlocale (-
479 6-
480 , "");-
481 bindtextdomain ("coreutils", "/usr/local/share/locale");-
482 textdomain ("coreutils");-
483-
484 initialize_exit_failure (EXIT_CANCELED);-
485 atexit (close_stdout);-
486-
487 while ((
(c = getopt_lo... *)0) )) != -1Description
TRUEevaluated 21 times by 1 test
Evaluated by:
  • stdbuf
FALSEevaluated 3 times by 1 test
Evaluated by:
  • stdbuf
c = getopt_long (argc, argv, "+i:o:e:", longopts,
(c = getopt_lo... *)0) )) != -1Description
TRUEevaluated 21 times by 1 test
Evaluated by:
  • stdbuf
FALSEevaluated 3 times by 1 test
Evaluated by:
  • stdbuf
3-21
488 ((void *)0)
(c = getopt_lo... *)0) )) != -1Description
TRUEevaluated 21 times by 1 test
Evaluated by:
  • stdbuf
FALSEevaluated 3 times by 1 test
Evaluated by:
  • stdbuf
3-21
489 )) != -1
(c = getopt_lo... *)0) )) != -1Description
TRUEevaluated 21 times by 1 test
Evaluated by:
  • stdbuf
FALSEevaluated 3 times by 1 test
Evaluated by:
  • stdbuf
)
3-21
490 {-
491 int opt_fileno;-
492-
493 switch (c)-
494 {-
495-
496 case
executed 2 times by 1 test: case 'e':
Executed by:
  • stdbuf
'e':
executed 2 times by 1 test: case 'e':
Executed by:
  • stdbuf
2
497 case
executed 3 times by 1 test: case 'i':
Executed by:
  • stdbuf
'i':
executed 3 times by 1 test: case 'i':
Executed by:
  • stdbuf
3
498 case
executed 6 times by 1 test: case 'o':
Executed by:
  • stdbuf
'o':
executed 6 times by 1 test: case 'o':
Executed by:
  • stdbuf
6
499 opt_fileno = optc_to_fileno (c);-
500 -
501 ((-
502 0 <= opt_fileno && opt_fileno < (sizeof (stdbuf) / sizeof *(stdbuf))-
503 ) ? (void) (0) : __assert_fail (-
504 "0 <= opt_fileno && opt_fileno < ARRAY_CARDINALITY (stdbuf)"-
505 , "src/stdbuf.c", 335, __PRETTY_FUNCTION__))-
506 ;-
507 stdbuf[opt_fileno].optc = c;-
508 while (c_isspace (*optarg)
c_isspace (*optarg)Description
TRUEnever evaluated
FALSEevaluated 11 times by 1 test
Evaluated by:
  • stdbuf
)
0-11
509 optarg++;
never executed: optarg++;
0
510 stdbuf[opt_fileno].optarg = optarg;-
511 if (c == 'i'
c == 'i'Description
TRUEevaluated 3 times by 1 test
Evaluated by:
  • stdbuf
FALSEevaluated 8 times by 1 test
Evaluated by:
  • stdbuf
&& *
*optarg == 'L'Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • stdbuf
FALSEevaluated 2 times by 1 test
Evaluated by:
  • stdbuf
optarg == 'L'
*optarg == 'L'Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • stdbuf
FALSEevaluated 2 times by 1 test
Evaluated by:
  • stdbuf
)
1-8
512 {-
513-
514-
515-
516 error (0, 0, -
517 dcgettext (((void *)0), -
518 "line buffering stdin is meaningless"-
519 , 5)-
520 );-
521 usage (EXIT_CANCELED);-
522 }
never executed: end of block
0
523-
524 if (!(
!( __extension...)))); }) == 0)Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • stdbuf
FALSEnever evaluated
0-10
525 __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (
!( __extension...)))); }) == 0)Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • stdbuf
FALSEnever evaluated
0-10
526 optarg
!( __extension...)))); }) == 0)Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • stdbuf
FALSEnever evaluated
0-10
527 ) && __builtin_constant_p (
!( __extension...)))); }) == 0)Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • stdbuf
FALSEnever evaluated
0-10
528 "L"
!( __extension...)))); }) == 0)Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • stdbuf
FALSEnever evaluated
0-10
529 ) && (__s1_len = __builtin_strlen (
!( __extension...)))); }) == 0)Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • stdbuf
FALSEnever evaluated
0-10
530 optarg
!( __extension...)))); }) == 0)Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • stdbuf
FALSEnever evaluated
0-10
531 ), __s2_len = __builtin_strlen (
!( __extension...)))); }) == 0)Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • stdbuf
FALSEnever evaluated
0-10
532 "L"
!( __extension...)))); }) == 0)Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • stdbuf
FALSEnever evaluated
0-10
533 ), (!((size_t)(const void *)((
!( __extension...)))); }) == 0)Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • stdbuf
FALSEnever evaluated
0-10
534 optarg
!( __extension...)))); }) == 0)Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • stdbuf
FALSEnever evaluated
0-10
535 ) + 1) - (size_t)(const void *)(
!( __extension...)))); }) == 0)Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • stdbuf
FALSEnever evaluated
0-10
536 optarg
!( __extension...)))); }) == 0)Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • stdbuf
FALSEnever evaluated
0-10
537 ) == 1) || __s1_len >= 4) && (!((size_t)(const void *)((
!( __extension...)))); }) == 0)Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • stdbuf
FALSEnever evaluated
0-10
538 "L"
!( __extension...)))); }) == 0)Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • stdbuf
FALSEnever evaluated
0-10
539 ) + 1) - (size_t)(const void *)(
!( __extension...)))); }) == 0)Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • stdbuf
FALSEnever evaluated
0-10
540 "L"
!( __extension...)))); }) == 0)Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • stdbuf
FALSEnever evaluated
0-10
541 ) == 1) || __s2_len >= 4)) ? __builtin_strcmp (
!( __extension...)))); }) == 0)Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • stdbuf
FALSEnever evaluated
0-10
542 optarg
!( __extension...)))); }) == 0)Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • stdbuf
FALSEnever evaluated
0-10
543 ,
!( __extension...)))); }) == 0)Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • stdbuf
FALSEnever evaluated
0-10
544 "L"
!( __extension...)))); }) == 0)Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • stdbuf
FALSEnever evaluated
0-10
545 ) : (__builtin_constant_p (
!( __extension...)))); }) == 0)Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • stdbuf
FALSEnever evaluated
0-10
546 optarg
!( __extension...)))); }) == 0)Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • stdbuf
FALSEnever evaluated
0-10
547 ) && ((size_t)(const void *)((
!( __extension...)))); }) == 0)Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • stdbuf
FALSEnever evaluated
0-10
548 optarg
!( __extension...)))); }) == 0)Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • stdbuf
FALSEnever evaluated
0-10
549 ) + 1) - (size_t)(const void *)(
!( __extension...)))); }) == 0)Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • stdbuf
FALSEnever evaluated
0-10
550 optarg
!( __extension...)))); }) == 0)Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • stdbuf
FALSEnever evaluated
0-10
551 ) == 1) && (__s1_len = __builtin_strlen (
!( __extension...)))); }) == 0)Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • stdbuf
FALSEnever evaluated
0-10
552 optarg
!( __extension...)))); }) == 0)Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • stdbuf
FALSEnever evaluated
0-10
553 ), __s1_len < 4) ? (__builtin_constant_p (
!( __extension...)))); }) == 0)Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • stdbuf
FALSEnever evaluated
0-10
554 "L"
!( __extension...)))); }) == 0)Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • stdbuf
FALSEnever evaluated
0-10
555 ) && ((size_t)(const void *)((
!( __extension...)))); }) == 0)Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • stdbuf
FALSEnever evaluated
0-10
556 "L"
!( __extension...)))); }) == 0)Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • stdbuf
FALSEnever evaluated
0-10
557 ) + 1) - (size_t)(const void *)(
!( __extension...)))); }) == 0)Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • stdbuf
FALSEnever evaluated
0-10
558 "L"
!( __extension...)))); }) == 0)Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • stdbuf
FALSEnever evaluated
0-10
559 ) == 1) ? __builtin_strcmp (
!( __extension...)))); }) == 0)Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • stdbuf
FALSEnever evaluated
0-10
560 optarg
!( __extension...)))); }) == 0)Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • stdbuf
FALSEnever evaluated
0-10
561 ,
!( __extension...)))); }) == 0)Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • stdbuf
FALSEnever evaluated
0-10
562 "L"
!( __extension...)))); }) == 0)Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • stdbuf
FALSEnever evaluated
0-10
563 ) : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (
!( __extension...)))); }) == 0)Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • stdbuf
FALSEnever evaluated
0-10
564 "L"
!( __extension...)))); }) == 0)Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • stdbuf
FALSEnever evaluated
0-10
565 ); int __result = (((const unsigned char *) (const char *) (
!( __extension...)))); }) == 0)Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • stdbuf
FALSEnever evaluated
0-10
566 optarg
!( __extension...)))); }) == 0)Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • stdbuf
FALSEnever evaluated
0-10
567 ))[0] - __s2[0]); if (__s1_len > 0
__s1_len > 0Description
TRUEnever evaluated
FALSEnever evaluated
&& __result == 0
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
) { __result = (((const unsigned char *) (const char *) (
!( __extension...)))); }) == 0)Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • stdbuf
FALSEnever evaluated
0-10
568 optarg
!( __extension...)))); }) == 0)Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • stdbuf
FALSEnever evaluated
0-10
569 ))[1] - __s2[1]); if (__s1_len > 1
__s1_len > 1Description
TRUEnever evaluated
FALSEnever evaluated
&& __result == 0
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
) { __result = (((const unsigned char *) (const char *) (
!( __extension...)))); }) == 0)Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • stdbuf
FALSEnever evaluated
0-10
570 optarg
!( __extension...)))); }) == 0)Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • stdbuf
FALSEnever evaluated
0-10
571 ))[2] - __s2[2]); if (__s1_len > 2
__s1_len > 2Description
TRUEnever evaluated
FALSEnever evaluated
&& __result == 0
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
) __result = (((const unsigned char *) (const char *) (
never executed: __result = (((const unsigned char *) (const char *) ( optarg ))[3] - __s2[3]);
!( __extension...)))); }) == 0)Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • stdbuf
FALSEnever evaluated
0-10
572 optarg
!( __extension...)))); }) == 0)Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • stdbuf
FALSEnever evaluated
never executed: __result = (((const unsigned char *) (const char *) ( optarg ))[3] - __s2[3]);
0-10
573 ))[3] - __s2[3]);
!( __extension...)))); }) == 0)Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • stdbuf
FALSEnever evaluated
never executed: __result = (((const unsigned char *) (const char *) ( optarg ))[3] - __s2[3]);
}
never executed: end of block
}
never executed: end of block
__result; }))) : (__builtin_constant_p (
!( __extension...)))); }) == 0)Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • stdbuf
FALSEnever evaluated
0-10
574 "L"
!( __extension...)))); }) == 0)Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • stdbuf
FALSEnever evaluated
0-10
575 ) && ((size_t)(const void *)((
!( __extension...)))); }) == 0)Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • stdbuf
FALSEnever evaluated
0-10
576 "L"
!( __extension...)))); }) == 0)Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • stdbuf
FALSEnever evaluated
0-10
577 ) + 1) - (size_t)(const void *)(
!( __extension...)))); }) == 0)Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • stdbuf
FALSEnever evaluated
0-10
578 "L"
!( __extension...)))); }) == 0)Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • stdbuf
FALSEnever evaluated
0-10
579 ) == 1) && (__s2_len = __builtin_strlen (
!( __extension...)))); }) == 0)Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • stdbuf
FALSEnever evaluated
0-10
580 "L"
!( __extension...)))); }) == 0)Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • stdbuf
FALSEnever evaluated
0-10
581 ), __s2_len < 4) ? (__builtin_constant_p (
!( __extension...)))); }) == 0)Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • stdbuf
FALSEnever evaluated
0-10
582 optarg
!( __extension...)))); }) == 0)Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • stdbuf
FALSEnever evaluated
0-10
583 ) && ((size_t)(const void *)((
!( __extension...)))); }) == 0)Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • stdbuf
FALSEnever evaluated
0-10
584 optarg
!( __extension...)))); }) == 0)Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • stdbuf
FALSEnever evaluated
0-10
585 ) + 1) - (size_t)(const void *)(
!( __extension...)))); }) == 0)Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • stdbuf
FALSEnever evaluated
0-10
586 optarg
!( __extension...)))); }) == 0)Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • stdbuf
FALSEnever evaluated
0-10
587 ) == 1) ? __builtin_strcmp (
!( __extension...)))); }) == 0)Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • stdbuf
FALSEnever evaluated
0-10
588 optarg
!( __extension...)))); }) == 0)Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • stdbuf
FALSEnever evaluated
0-10
589 ,
!( __extension...)))); }) == 0)Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • stdbuf
FALSEnever evaluated
0-10
590 "L"
!( __extension...)))); }) == 0)Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • stdbuf
FALSEnever evaluated
0-10
591 ) : -(__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (
!( __extension...)))); }) == 0)Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • stdbuf
FALSEnever evaluated
0-10
592 optarg
!( __extension...)))); }) == 0)Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • stdbuf
FALSEnever evaluated
0-10
593 ); int __result = (((const unsigned char *) (const char *) (
!( __extension...)))); }) == 0)Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • stdbuf
FALSEnever evaluated
0-10
594 "L"
!( __extension...)))); }) == 0)Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • stdbuf
FALSEnever evaluated
0-10
595 ))[0] - __s2[0]); if (__s2_len > 0
__s2_len > 0Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • stdbuf
FALSEnever evaluated
&& __result == 0
__result == 0Description
TRUEnever evaluated
FALSEevaluated 10 times by 1 test
Evaluated by:
  • stdbuf
) { __result = (((const unsigned char *) (const char *) (
!( __extension...)))); }) == 0)Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • stdbuf
FALSEnever evaluated
0-10
596 "L"
!( __extension...)))); }) == 0)Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • stdbuf
FALSEnever evaluated
0-10
597 ))[1] - __s2[1]); if (__s2_len > 1
__s2_len > 1Description
TRUEnever evaluated
FALSEnever evaluated
&& __result == 0
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
) { __result = (((const unsigned char *) (const char *) (
!( __extension...)))); }) == 0)Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • stdbuf
FALSEnever evaluated
0-10
598 "L"
!( __extension...)))); }) == 0)Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • stdbuf
FALSEnever evaluated
0-10
599 ))[2] - __s2[2]); if (__s2_len > 2
__s2_len > 2Description
TRUEnever evaluated
FALSEnever evaluated
&& __result == 0
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
) __result = (((const unsigned char *) (const char *) (
never executed: __result = (((const unsigned char *) (const char *) ( "L" ))[3] - __s2[3]);
!( __extension...)))); }) == 0)Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • stdbuf
FALSEnever evaluated
0-10
600 "L"
!( __extension...)))); }) == 0)Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • stdbuf
FALSEnever evaluated
never executed: __result = (((const unsigned char *) (const char *) ( "L" ))[3] - __s2[3]);
0-10
601 ))[3] - __s2[3]);
!( __extension...)))); }) == 0)Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • stdbuf
FALSEnever evaluated
never executed: __result = (((const unsigned char *) (const char *) ( "L" ))[3] - __s2[3]);
}
never executed: end of block
}
never executed: end of block
__result; }))) : __builtin_strcmp (
!( __extension...)))); }) == 0)Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • stdbuf
FALSEnever evaluated
0-10
602 optarg
!( __extension...)))); }) == 0)Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • stdbuf
FALSEnever evaluated
0-10
603 ,
!( __extension...)))); }) == 0)Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • stdbuf
FALSEnever evaluated
0-10
604 "L"
!( __extension...)))); }) == 0)Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • stdbuf
FALSEnever evaluated
0-10
605 )))); })
!( __extension...)))); }) == 0)Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • stdbuf
FALSEnever evaluated
0-10
606 == 0)
!( __extension...)))); }) == 0)Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • stdbuf
FALSEnever evaluated
0-10
607 && parse_size (optarg, &stdbuf[opt_fileno].size) == -1
parse_size (op...o].size) == -1Description
TRUEevaluated 8 times by 1 test
Evaluated by:
  • stdbuf
FALSEevaluated 2 times by 1 test
Evaluated by:
  • stdbuf
)
2-8
608 ((
executed 8 times by 1 test: ((!!sizeof (struct { _Static_assert (EXIT_CANCELED, "verify_expr (" "EXIT_CANCELED" ", " "(error (EXIT_CANCELED, (*__errno_location ()), dcgettext (((void *)0), \"invalid mode %s\", 5), quote (optarg)), assume (false))" ")"); int _gl_dummy; })) ? ((error ...invalid mode %s" , 5) , quote (optarg)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error (EXIT_CANCELED, (*__errno_location ()) , dcgettext (((void *)0), "invalid mode %s" , 5) , quote (optarg)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
Executed by:
  • stdbuf
!!sizeof (struct { _Static_assert (EXIT_CANCELED, "verify_expr (" "EXIT_CANCELED" ", " "(error (EXIT_CANCELED, (*__errno_location ()), dcgettext (((void *)0), \"invalid mode %s\", 5), quote (optarg)), assume (false))" ")"); int _gl_dummy; })) ? ((error (EXIT_CANCELED,
executed 8 times by 1 test: ((!!sizeof (struct { _Static_assert (EXIT_CANCELED, "verify_expr (" "EXIT_CANCELED" ", " "(error (EXIT_CANCELED, (*__errno_location ()), dcgettext (((void *)0), \"invalid mode %s\", 5), quote (optarg)), assume (false))" ")"); int _gl_dummy; })) ? ((error ...invalid mode %s" , 5) , quote (optarg)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error (EXIT_CANCELED, (*__errno_location ()) , dcgettext (((void *)0), "invalid mode %s" , 5) , quote (optarg)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
Executed by:
  • stdbuf
8
609 (*__errno_location ())
executed 8 times by 1 test: ((!!sizeof (struct { _Static_assert (EXIT_CANCELED, "verify_expr (" "EXIT_CANCELED" ", " "(error (EXIT_CANCELED, (*__errno_location ()), dcgettext (((void *)0), \"invalid mode %s\", 5), quote (optarg)), assume (false))" ")"); int _gl_dummy; })) ? ((error ...invalid mode %s" , 5) , quote (optarg)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error (EXIT_CANCELED, (*__errno_location ()) , dcgettext (((void *)0), "invalid mode %s" , 5) , quote (optarg)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
Executed by:
  • stdbuf
8
610 ,
executed 8 times by 1 test: ((!!sizeof (struct { _Static_assert (EXIT_CANCELED, "verify_expr (" "EXIT_CANCELED" ", " "(error (EXIT_CANCELED, (*__errno_location ()), dcgettext (((void *)0), \"invalid mode %s\", 5), quote (optarg)), assume (false))" ")"); int _gl_dummy; })) ? ((error ...invalid mode %s" , 5) , quote (optarg)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error (EXIT_CANCELED, (*__errno_location ()) , dcgettext (((void *)0), "invalid mode %s" , 5) , quote (optarg)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
Executed by:
  • stdbuf
8
611 dcgettext (((void *)0),
executed 8 times by 1 test: ((!!sizeof (struct { _Static_assert (EXIT_CANCELED, "verify_expr (" "EXIT_CANCELED" ", " "(error (EXIT_CANCELED, (*__errno_location ()), dcgettext (((void *)0), \"invalid mode %s\", 5), quote (optarg)), assume (false))" ")"); int _gl_dummy; })) ? ((error ...invalid mode %s" , 5) , quote (optarg)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error (EXIT_CANCELED, (*__errno_location ()) , dcgettext (((void *)0), "invalid mode %s" , 5) , quote (optarg)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
Executed by:
  • stdbuf
8
612 "invalid mode %s"
executed 8 times by 1 test: ((!!sizeof (struct { _Static_assert (EXIT_CANCELED, "verify_expr (" "EXIT_CANCELED" ", " "(error (EXIT_CANCELED, (*__errno_location ()), dcgettext (((void *)0), \"invalid mode %s\", 5), quote (optarg)), assume (false))" ")"); int _gl_dummy; })) ? ((error ...invalid mode %s" , 5) , quote (optarg)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error (EXIT_CANCELED, (*__errno_location ()) , dcgettext (((void *)0), "invalid mode %s" , 5) , quote (optarg)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
Executed by:
  • stdbuf
8
613 , 5)
executed 8 times by 1 test: ((!!sizeof (struct { _Static_assert (EXIT_CANCELED, "verify_expr (" "EXIT_CANCELED" ", " "(error (EXIT_CANCELED, (*__errno_location ()), dcgettext (((void *)0), \"invalid mode %s\", 5), quote (optarg)), assume (false))" ")"); int _gl_dummy; })) ? ((error ...invalid mode %s" , 5) , quote (optarg)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error (EXIT_CANCELED, (*__errno_location ()) , dcgettext (((void *)0), "invalid mode %s" , 5) , quote (optarg)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
Executed by:
  • stdbuf
8
614 , quote (optarg)), ((
executed 8 times by 1 test: ((!!sizeof (struct { _Static_assert (EXIT_CANCELED, "verify_expr (" "EXIT_CANCELED" ", " "(error (EXIT_CANCELED, (*__errno_location ()), dcgettext (((void *)0), \"invalid mode %s\", 5), quote (optarg)), assume (false))" ")"); int _gl_dummy; })) ? ((error ...invalid mode %s" , 5) , quote (optarg)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error (EXIT_CANCELED, (*__errno_location ()) , dcgettext (((void *)0), "invalid mode %s" , 5) , quote (optarg)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
Executed by:
  • stdbuf
8
615 0
executed 8 times by 1 test: ((!!sizeof (struct { _Static_assert (EXIT_CANCELED, "verify_expr (" "EXIT_CANCELED" ", " "(error (EXIT_CANCELED, (*__errno_location ()), dcgettext (((void *)0), \"invalid mode %s\", 5), quote (optarg)), assume (false))" ")"); int _gl_dummy; })) ? ((error ...invalid mode %s" , 5) , quote (optarg)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error (EXIT_CANCELED, (*__errno_location ()) , dcgettext (((void *)0), "invalid mode %s" , 5) , quote (optarg)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
Executed by:
  • stdbuf
8
616 ) ? (void) 0 : __builtin_unreachable ()))) : ((error (EXIT_CANCELED,
executed 8 times by 1 test: ((!!sizeof (struct { _Static_assert (EXIT_CANCELED, "verify_expr (" "EXIT_CANCELED" ", " "(error (EXIT_CANCELED, (*__errno_location ()), dcgettext (((void *)0), \"invalid mode %s\", 5), quote (optarg)), assume (false))" ")"); int _gl_dummy; })) ? ((error ...invalid mode %s" , 5) , quote (optarg)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error (EXIT_CANCELED, (*__errno_location ()) , dcgettext (((void *)0), "invalid mode %s" , 5) , quote (optarg)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
Executed by:
  • stdbuf
8
617 (*__errno_location ())
executed 8 times by 1 test: ((!!sizeof (struct { _Static_assert (EXIT_CANCELED, "verify_expr (" "EXIT_CANCELED" ", " "(error (EXIT_CANCELED, (*__errno_location ()), dcgettext (((void *)0), \"invalid mode %s\", 5), quote (optarg)), assume (false))" ")"); int _gl_dummy; })) ? ((error ...invalid mode %s" , 5) , quote (optarg)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error (EXIT_CANCELED, (*__errno_location ()) , dcgettext (((void *)0), "invalid mode %s" , 5) , quote (optarg)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
Executed by:
  • stdbuf
8
618 ,
executed 8 times by 1 test: ((!!sizeof (struct { _Static_assert (EXIT_CANCELED, "verify_expr (" "EXIT_CANCELED" ", " "(error (EXIT_CANCELED, (*__errno_location ()), dcgettext (((void *)0), \"invalid mode %s\", 5), quote (optarg)), assume (false))" ")"); int _gl_dummy; })) ? ((error ...invalid mode %s" , 5) , quote (optarg)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error (EXIT_CANCELED, (*__errno_location ()) , dcgettext (((void *)0), "invalid mode %s" , 5) , quote (optarg)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
Executed by:
  • stdbuf
8
619 dcgettext (((void *)0),
executed 8 times by 1 test: ((!!sizeof (struct { _Static_assert (EXIT_CANCELED, "verify_expr (" "EXIT_CANCELED" ", " "(error (EXIT_CANCELED, (*__errno_location ()), dcgettext (((void *)0), \"invalid mode %s\", 5), quote (optarg)), assume (false))" ")"); int _gl_dummy; })) ? ((error ...invalid mode %s" , 5) , quote (optarg)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error (EXIT_CANCELED, (*__errno_location ()) , dcgettext (((void *)0), "invalid mode %s" , 5) , quote (optarg)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
Executed by:
  • stdbuf
8
620 "invalid mode %s"
executed 8 times by 1 test: ((!!sizeof (struct { _Static_assert (EXIT_CANCELED, "verify_expr (" "EXIT_CANCELED" ", " "(error (EXIT_CANCELED, (*__errno_location ()), dcgettext (((void *)0), \"invalid mode %s\", 5), quote (optarg)), assume (false))" ")"); int _gl_dummy; })) ? ((error ...invalid mode %s" , 5) , quote (optarg)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error (EXIT_CANCELED, (*__errno_location ()) , dcgettext (((void *)0), "invalid mode %s" , 5) , quote (optarg)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
Executed by:
  • stdbuf
8
621 , 5)
executed 8 times by 1 test: ((!!sizeof (struct { _Static_assert (EXIT_CANCELED, "verify_expr (" "EXIT_CANCELED" ", " "(error (EXIT_CANCELED, (*__errno_location ()), dcgettext (((void *)0), \"invalid mode %s\", 5), quote (optarg)), assume (false))" ")"); int _gl_dummy; })) ? ((error ...invalid mode %s" , 5) , quote (optarg)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error (EXIT_CANCELED, (*__errno_location ()) , dcgettext (((void *)0), "invalid mode %s" , 5) , quote (optarg)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
Executed by:
  • stdbuf
8
622 , quote (optarg)), ((
executed 8 times by 1 test: ((!!sizeof (struct { _Static_assert (EXIT_CANCELED, "verify_expr (" "EXIT_CANCELED" ", " "(error (EXIT_CANCELED, (*__errno_location ()), dcgettext (((void *)0), \"invalid mode %s\", 5), quote (optarg)), assume (false))" ")"); int _gl_dummy; })) ? ((error ...invalid mode %s" , 5) , quote (optarg)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error (EXIT_CANCELED, (*__errno_location ()) , dcgettext (((void *)0), "invalid mode %s" , 5) , quote (optarg)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
Executed by:
  • stdbuf
8
623 0
executed 8 times by 1 test: ((!!sizeof (struct { _Static_assert (EXIT_CANCELED, "verify_expr (" "EXIT_CANCELED" ", " "(error (EXIT_CANCELED, (*__errno_location ()), dcgettext (((void *)0), \"invalid mode %s\", 5), quote (optarg)), assume (false))" ")"); int _gl_dummy; })) ? ((error ...invalid mode %s" , 5) , quote (optarg)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error (EXIT_CANCELED, (*__errno_location ()) , dcgettext (((void *)0), "invalid mode %s" , 5) , quote (optarg)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
Executed by:
  • stdbuf
8
624 ) ? (void) 0 : __builtin_unreachable ()))));
executed 8 times by 1 test: ((!!sizeof (struct { _Static_assert (EXIT_CANCELED, "verify_expr (" "EXIT_CANCELED" ", " "(error (EXIT_CANCELED, (*__errno_location ()), dcgettext (((void *)0), \"invalid mode %s\", 5), quote (optarg)), assume (false))" ")"); int _gl_dummy; })) ? ((error ...invalid mode %s" , 5) , quote (optarg)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error (EXIT_CANCELED, (*__errno_location ()) , dcgettext (((void *)0), "invalid mode %s" , 5) , quote (optarg)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
Executed by:
  • stdbuf
8
625-
626 break;
executed 2 times by 1 test: break;
Executed by:
  • stdbuf
2
627-
628 case
executed 3 times by 1 test: case GETOPT_HELP_CHAR:
Executed by:
  • stdbuf
GETOPT_HELP_CHAR:
executed 3 times by 1 test: case GETOPT_HELP_CHAR:
Executed by:
  • stdbuf
usage (
3
629 0-
630 ); break;
never executed: break;
;
0
631-
632 case
executed 4 times by 1 test: case GETOPT_VERSION_CHAR:
Executed by:
  • stdbuf
GETOPT_VERSION_CHAR:
executed 4 times by 1 test: case GETOPT_VERSION_CHAR:
Executed by:
  • stdbuf
version_etc (
4
633 stdout-
634 , "stdbuf", "GNU coreutils", Version, ("Padraig Brady"), (char *) -
635 ((void *)0)-
636 ); exit (
executed 4 times by 1 test: exit ( 0 );
Executed by:
  • stdbuf
4
637 0
executed 4 times by 1 test: exit ( 0 );
Executed by:
  • stdbuf
4
638 );
executed 4 times by 1 test: exit ( 0 );
Executed by:
  • stdbuf
break;
never executed: break;
;
0-4
639-
640 default
executed 3 times by 1 test: default:
Executed by:
  • stdbuf
:
executed 3 times by 1 test: default:
Executed by:
  • stdbuf
3
641 usage (EXIT_CANCELED);-
642 }
never executed: end of block
0
643 }-
644-
645 argv += optind;-
646 argc -= optind;-
647-
648-
649 if (argc < 1
argc < 1Description
TRUEnever evaluated
FALSEevaluated 3 times by 1 test
Evaluated by:
  • stdbuf
)
0-3
650 {-
651 error (0, 0, -
652 dcgettext (((void *)0), -
653 "missing operand"-
654 , 5)-
655 );-
656 usage (EXIT_CANCELED);-
657 }
never executed: end of block
0
658-
659 if (! set_libstdbuf_options ()
! set_libstdbuf_options ()Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • stdbuf
FALSEevaluated 2 times by 1 test
Evaluated by:
  • stdbuf
)
1-2
660 {-
661 error (0, 0, -
662 dcgettext (((void *)0), -
663 "you must specify a buffering mode option"-
664 , 5)-
665 );-
666 usage (EXIT_CANCELED);-
667 }
never executed: end of block
0
668-
669-
670-
671 set_program_path (program_name);-
672 if (!program_path
!program_pathDescription
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • stdbuf
)
0-2
673 program_path = xstrdup ("/usr/local/lib/coreutils");
never executed: program_path = xstrdup ("/usr/local/lib/coreutils");
0
674 set_LD_PRELOAD ();-
675 free (program_path);-
676-
677 execvp (*argv, argv);-
678-
679 int exit_status = -
680 (*
(*__errno_location ()) == 2Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • stdbuf
FALSEevaluated 1 time by 1 test
Evaluated by:
  • stdbuf
__errno_location ())
(*__errno_location ()) == 2Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • stdbuf
FALSEevaluated 1 time by 1 test
Evaluated by:
  • stdbuf
1
681 ==
(*__errno_location ()) == 2Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • stdbuf
FALSEevaluated 1 time by 1 test
Evaluated by:
  • stdbuf
1
682 2
(*__errno_location ()) == 2Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • stdbuf
FALSEevaluated 1 time by 1 test
Evaluated by:
  • stdbuf
1
683 ? EXIT_ENOENT : EXIT_CANNOT_INVOKE;-
684 error (0, -
685 (*__errno_location ())-
686 , -
687 dcgettext (((void *)0), -
688 "failed to run command %s"-
689 , 5)-
690 , quote (argv[0]));-
691 return
executed 2 times by 1 test: return exit_status;
Executed by:
  • stdbuf
exit_status;
executed 2 times by 1 test: return exit_status;
Executed by:
  • stdbuf
2
692}-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.1.2