OpenCoverage

cp.c

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/coreutils/src/src/cp.c
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3struct dir_attr-
4{-
5 struct stat st;-
6 -
7 _Bool -
8 restore_mode;-
9 size_t slash_offset;-
10 struct dir_attr *next;-
11};-
12-
13-
14-
15enum-
16{-
17 ATTRIBUTES_ONLY_OPTION = 0x7f + 1,-
18 COPY_CONTENTS_OPTION,-
19 NO_PRESERVE_ATTRIBUTES_OPTION,-
20 PARENTS_OPTION,-
21 PRESERVE_ATTRIBUTES_OPTION,-
22 REFLINK_OPTION,-
23 SPARSE_OPTION,-
24 STRIP_TRAILING_SLASHES_OPTION,-
25 UNLINK_DEST_BEFORE_OPENING-
26};-
27-
28-
29static -
30 _Bool -
31 selinux_enabled;-
32-
33-
34-
35static -
36 _Bool -
37 parents_option = -
38 0-
39 ;-
40-
41-
42static -
43 _Bool -
44 remove_trailing_slashes;-
45-
46static char const *const sparse_type_string[] =-
47{-
48 "never", "auto", "always", -
49 ((void *)0)-
50-
51};-
52static enum Sparse_type const sparse_type[] =-
53{-
54 SPARSE_NEVER, SPARSE_AUTO, SPARSE_ALWAYS-
55};-
56_Static_assert ((sizeof (sparse_type_string) / sizeof *(sparse_type_string)) == (sizeof (sparse_type) / sizeof *(sparse_type)) + 1, "verify (" "ARRAY_CARDINALITY (sparse_type_string) == ARRAY_CARDINALITY (sparse_type) + 1" ")");-
57-
58static char const *const reflink_type_string[] =-
59{-
60 "auto", "always", -
61 ((void *)0)-
62-
63};-
64static enum Reflink_type const reflink_type[] =-
65{-
66 REFLINK_AUTO, REFLINK_ALWAYS-
67};-
68_Static_assert ((sizeof (reflink_type_string) / sizeof *(reflink_type_string)) == (sizeof (reflink_type) / sizeof *(reflink_type)) + 1, "verify (" "ARRAY_CARDINALITY (reflink_type_string) == ARRAY_CARDINALITY (reflink_type) + 1" ")");-
69-
70static struct option const long_opts[] =-
71{-
72 {"archive", -
73 0-
74 , -
75 ((void *)0)-
76 , 'a'},-
77 {"attributes-only", -
78 0-
79 , -
80 ((void *)0)-
81 , ATTRIBUTES_ONLY_OPTION},-
82 {"backup", -
83 2-
84 , -
85 ((void *)0)-
86 , 'b'},-
87 {"copy-contents", -
88 0-
89 , -
90 ((void *)0)-
91 , COPY_CONTENTS_OPTION},-
92 {"dereference", -
93 0-
94 , -
95 ((void *)0)-
96 , 'L'},-
97 {"force", -
98 0-
99 , -
100 ((void *)0)-
101 , 'f'},-
102 {"interactive", -
103 0-
104 , -
105 ((void *)0)-
106 , 'i'},-
107 {"link", -
108 0-
109 , -
110 ((void *)0)-
111 , 'l'},-
112 {"no-clobber", -
113 0-
114 , -
115 ((void *)0)-
116 , 'n'},-
117 {"no-dereference", -
118 0-
119 , -
120 ((void *)0)-
121 , 'P'},-
122 {"no-preserve", -
123 1-
124 , -
125 ((void *)0)-
126 , NO_PRESERVE_ATTRIBUTES_OPTION},-
127 {"no-target-directory", -
128 0-
129 , -
130 ((void *)0)-
131 , 'T'},-
132 {"one-file-system", -
133 0-
134 , -
135 ((void *)0)-
136 , 'x'},-
137 {"parents", -
138 0-
139 , -
140 ((void *)0)-
141 , PARENTS_OPTION},-
142 {"path", -
143 0-
144 , -
145 ((void *)0)-
146 , PARENTS_OPTION},-
147 {"preserve", -
148 2-
149 , -
150 ((void *)0)-
151 , PRESERVE_ATTRIBUTES_OPTION},-
152 {"recursive", -
153 0-
154 , -
155 ((void *)0)-
156 , 'R'},-
157 {"remove-destination", -
158 0-
159 , -
160 ((void *)0)-
161 , UNLINK_DEST_BEFORE_OPENING},-
162 {"sparse", -
163 1-
164 , -
165 ((void *)0)-
166 , SPARSE_OPTION},-
167 {"reflink", -
168 2-
169 , -
170 ((void *)0)-
171 , REFLINK_OPTION},-
172 {"strip-trailing-slashes", -
173 0-
174 , -
175 ((void *)0)-
176 , STRIP_TRAILING_SLASHES_OPTION},-
177 {"suffix", -
178 1-
179 , -
180 ((void *)0)-
181 , 'S'},-
182 {"symbolic-link", -
183 0-
184 , -
185 ((void *)0)-
186 , 's'},-
187 {"target-directory", -
188 1-
189 , -
190 ((void *)0)-
191 , 't'},-
192 {"update", -
193 0-
194 , -
195 ((void *)0)-
196 , 'u'},-
197 {"verbose", -
198 0-
199 , -
200 ((void *)0)-
201 , 'v'},-
202 {"context", -
203 2-
204 , -
205 ((void *)0)-
206 , 'Z'},-
207 {"help", -
208 0-
209 , -
210 ((void *)0)-
211 , GETOPT_HELP_CHAR},-
212 {"version", -
213 0-
214 , -
215 ((void *)0)-
216 , GETOPT_VERSION_CHAR},-
217 {-
218 ((void *)0)-
219 , 0, -
220 ((void *)0)-
221 , 0}-
222};-
223-
224void-
225usage (int status)-
226{-
227 if (status !=
status != 0Description
TRUEevaluated 8 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 46 times by 1 test
Evaluated by:
  • cp
8-46
228 0
status != 0Description
TRUEevaluated 8 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 46 times by 1 test
Evaluated by:
  • cp
8-46
229 )-
230 do { fprintf (-
231 stderr-
232 , -
233 dcgettext (((void *)0), -
234 "Try '%s --help' for more information.\n"-
235 , 5)-
236 , program_name); }
executed 8 times by 1 test: end of block
Executed by:
  • cp
while (0);
8
237 else-
238 {-
239 printf (-
240 dcgettext (((void *)0), -
241 "Usage: %s [OPTION]... [-T] SOURCE DEST\n or: %s [OPTION]... SOURCE... DIRECTORY\n or: %s [OPTION]... -t DIRECTORY SOURCE...\n"-
242 , 5)-
243-
244-
245-
246 -
247 ,-
248 program_name, program_name, program_name);-
249 fputs_unlocked (-
250 dcgettext (((void *)0), -
251 "Copy SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY.\n"-
252 , 5)-
253 ,-
254 stdout-
255 )-
256-
257 ;-
258-
259 emit_mandatory_arg_note ();-
260-
261 fputs_unlocked (-
262 dcgettext (((void *)0), -
263 " -a, --archive same as -dR --preserve=all\n --attributes-only don't copy the file data, just the attributes\n --backup[=CONTROL] make a backup of each existing destination file\n -b like --backup but does not accept an argument\n --copy-contents copy contents of special files when recursive\n -d same as --no-dereference --preserve=links\n"-
264 , 5)-
265 ,-
266 stdout-
267 )-
268-
269-
270-
271-
272-
273-
274-
275 ;-
276 fputs_unlocked (-
277 dcgettext (((void *)0), -
278 " -f, --force if an existing destination file cannot be\n opened, remove it and try again (this option\n is ignored when the -n option is also used)\n -i, --interactive prompt before overwrite (overrides a previous -n\n option)\n -H follow command-line symbolic links in SOURCE\n"-
279 , 5)-
280 ,-
281 stdout-
282 )-
283-
284-
285-
286-
287-
288-
289-
290 ;-
291 fputs_unlocked (-
292 dcgettext (((void *)0), -
293 " -l, --link hard link files instead of copying\n -L, --dereference always follow symbolic links in SOURCE\n"-
294 , 5)-
295 ,-
296 stdout-
297 )-
298-
299-
300 ;-
301 fputs_unlocked (-
302 dcgettext (((void *)0), -
303 " -n, --no-clobber do not overwrite an existing file (overrides\n a previous -i option)\n -P, --no-dereference never follow symbolic links in SOURCE\n"-
304 , 5)-
305 ,-
306 stdout-
307 )-
308-
309-
310-
311 ;-
312 fputs_unlocked (-
313 dcgettext (((void *)0), -
314 " -p same as --preserve=mode,ownership,timestamps\n --preserve[=ATTR_LIST] preserve the specified attributes (default:\n mode,ownership,timestamps), if possible\n additional attributes: context, links, xattr,\n all\n"-
315 , 5)-
316 ,-
317 stdout-
318 )-
319-
320-
321-
322-
323-
324-
325 ;-
326 fputs_unlocked (-
327 dcgettext (((void *)0), -
328 " --no-preserve=ATTR_LIST don't preserve the specified attributes\n --parents use full source file name under DIRECTORY\n"-
329 , 5)-
330 ,-
331 stdout-
332 )-
333-
334-
335 ;-
336 fputs_unlocked (-
337 dcgettext (((void *)0), -
338 " -R, -r, --recursive copy directories recursively\n --reflink[=WHEN] control clone/CoW copies. See below\n --remove-destination remove each existing destination file before\n attempting to open it (contrast with --force)\n"-
339 , 5)-
340 ,-
341 stdout-
342 )-
343-
344-
345-
346-
347 ;-
348 fputs_unlocked (-
349 dcgettext (((void *)0), -
350 " --sparse=WHEN control creation of sparse files. See below\n --strip-trailing-slashes remove any trailing slashes from each SOURCE\n argument\n"-
351 , 5)-
352 ,-
353 stdout-
354 )-
355-
356-
357-
358 ;-
359 fputs_unlocked (-
360 dcgettext (((void *)0), -
361 " -s, --symbolic-link make symbolic links instead of copying\n -S, --suffix=SUFFIX override the usual backup suffix\n -t, --target-directory=DIRECTORY copy all SOURCE arguments into DIRECTORY\n -T, --no-target-directory treat DEST as a normal file\n"-
362 , 5)-
363 ,-
364 stdout-
365 )-
366-
367-
368-
369-
370 ;-
371 fputs_unlocked (-
372 dcgettext (((void *)0), -
373 " -u, --update copy only when the SOURCE file is newer\n than the destination file or when the\n destination file is missing\n -v, --verbose explain what is being done\n -x, --one-file-system stay on this file system\n"-
374 , 5)-
375 ,-
376 stdout-
377 )-
378-
379-
380-
381-
382-
383 ;-
384 fputs_unlocked (-
385 dcgettext (((void *)0), -
386 " -Z set SELinux security context of destination\n file to default type\n --context[=CTX] like -Z, or if CTX is specified then set the\n SELinux or SMACK security context to CTX\n"-
387 , 5)-
388 ,-
389 stdout-
390 )-
391-
392-
393-
394-
395 ;-
396 fputs_unlocked (-
397 dcgettext (((void *)0), -
398 " --help display this help and exit\n"-
399 , 5)-
400 ,-
401 stdout-
402 );-
403 fputs_unlocked (-
404 dcgettext (((void *)0), -
405 " --version output version information and exit\n"-
406 , 5)-
407 ,-
408 stdout-
409 );-
410 fputs_unlocked (-
411 dcgettext (((void *)0), -
412 "\nBy default, sparse SOURCE files are detected by a crude heuristic and the\ncorresponding DEST file is made sparse as well. That is the behavior\nselected by --sparse=auto. Specify --sparse=always to create a sparse DEST\nfile whenever the SOURCE file contains a long enough sequence of zero bytes.\nUse --sparse=never to inhibit creation of sparse files.\n\nWhen --reflink[=always] is specified, perform a lightweight copy, where the\ndata blocks are copied only when modified. If this is not possible the copy\nfails, or if --reflink=auto is specified, fall back to a standard copy.\n"-
413 , 5)-
414 ,-
415 stdout-
416 )-
417 ;-
418 emit_backup_suffix_note ();-
419 fputs_unlocked (-
420 dcgettext (((void *)0), -
421 "\nAs a special case, cp makes a backup of SOURCE when the force and backup\noptions are given and SOURCE and DEST are the same name for an existing,\nregular file.\n"-
422 , 5)-
423 ,-
424 stdout-
425 )-
426-
427-
428-
429-
430 ;-
431 emit_ancillary_info ("cp");-
432 }
executed 46 times by 1 test: end of block
Executed by:
  • cp
46
433 exit (status);
executed 54 times by 1 test: exit (status);
Executed by:
  • cp
54
434}-
435static -
436 _Bool-
437-
438re_protect (char const *const_dst_name, size_t src_offset,-
439 struct dir_attr *attr_list, const struct cp_options *x)-
440{-
441 struct dir_attr *p;-
442 char *dst_name;-
443 char *src_name;-
444-
445 do { dst_name = -
446 (__extension__ ({ const char *__old = (-
447 const_dst_name-
448 ); size_t __len = strlen (__old) + 1; char *__new = (char *) __builtin_alloca (__len); (char *) memcpy (__new, __old, __len); }))-
449 ; } while (0);-
450 src_name = dst_name + src_offset;-
451-
452 for (p = attr_list; p
pDescription
TRUEevaluated 15 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 12 times by 1 test
Evaluated by:
  • cp
; p = p->next)
12-15
453 {-
454 dst_name[p->slash_offset] = '\0';-
455-
456-
457-
458-
459-
460 if (x->preserve_timestamps
x->preserve_timestampsDescription
TRUEevaluated 13 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 2 times by 1 test
Evaluated by:
  • cp
)
2-13
461 {-
462 struct timespec timespec[2];-
463-
464 timespec[0] = get_stat_atime (&p->st);-
465 timespec[1] = get_stat_mtime (&p->st);-
466-
467 if (utimens (dst_name, timespec)
utimens (dst_name, timespec)Description
TRUEnever evaluated
FALSEevaluated 13 times by 1 test
Evaluated by:
  • cp
)
0-13
468 {-
469 error (0, -
470 (*__errno_location ())-
471 , -
472 dcgettext (((void *)0), -
473 "failed to preserve times for %s"-
474 , 5)-
475 ,-
476 quotearg_style (shell_escape_always_quoting_style, dst_name));-
477 return
never executed: return 0 ;
never executed: return 0 ;
0
478 0
never executed: return 0 ;
0
479 ;
never executed: return 0 ;
0
480 }-
481 }
executed 13 times by 1 test: end of block
Executed by:
  • cp
13
482-
483 if (x->preserve_ownership
x->preserve_ownershipDescription
TRUEevaluated 13 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 2 times by 1 test
Evaluated by:
  • cp
)
2-13
484 {-
485 if (lchown (dst_name, p->st.st_uid, p->st.st_gid) != 0
lchown (dst_na...t.st_gid) != 0Description
TRUEnever evaluated
FALSEevaluated 13 times by 1 test
Evaluated by:
  • cp
)
0-13
486 {-
487 if (! chown_failure_ok (x)
! chown_failure_ok (x)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
488 {-
489 error (0, -
490 (*__errno_location ())-
491 , -
492 dcgettext (((void *)0), -
493 "failed to preserve ownership for %s"-
494 , 5)-
495 ,-
496 quotearg_style (shell_escape_always_quoting_style, dst_name));-
497 return
never executed: return 0 ;
never executed: return 0 ;
0
498 0
never executed: return 0 ;
0
499 ;
never executed: return 0 ;
0
500 }-
501-
502-
503 (__extension__ ({ __typeof__ (lchown (dst_name, -1, p->st.st_gid)) __x = (lchown (dst_name, -1, p->st.st_gid)); (void) __x; }));-
504 }
never executed: end of block
0
505 }
executed 13 times by 1 test: end of block
Executed by:
  • cp
13
506-
507 if (x->preserve_mode
x->preserve_modeDescription
TRUEevaluated 13 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 2 times by 1 test
Evaluated by:
  • cp
)
2-13
508 {-
509 if (copy_acl (src_name, -1, dst_name, -1, p->st.st_mode) != 0
copy_acl (src_....st_mode) != 0Description
TRUEnever evaluated
FALSEevaluated 13 times by 1 test
Evaluated by:
  • cp
)
0-13
510 return
never executed: return 0 ;
never executed: return 0 ;
0
511 0
never executed: return 0 ;
0
512 ;
never executed: return 0 ;
0
513 }
executed 13 times by 1 test: end of block
Executed by:
  • cp
13
514 else if (p->restore_mode
p->restore_modeDescription
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • cp
)
0-2
515 {-
516 if (-
517 chmod
chmod (dst_nam....st_mode) != 0Description
TRUEnever evaluated
FALSEnever evaluated
0
518 (dst_name, p->st.st_mode) != 0
chmod (dst_nam....st_mode) != 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
519 {-
520 error (0, -
521 (*__errno_location ())-
522 , -
523 dcgettext (((void *)0), -
524 "failed to preserve permissions for %s"-
525 , 5)-
526 ,-
527 quotearg_style (shell_escape_always_quoting_style, dst_name));-
528 return
never executed: return 0 ;
never executed: return 0 ;
0
529 0
never executed: return 0 ;
0
530 ;
never executed: return 0 ;
0
531 }-
532 }
never executed: end of block
0
533-
534 dst_name[p->slash_offset] = '/';-
535 }
executed 15 times by 1 test: end of block
Executed by:
  • cp
15
536 return
executed 12 times by 1 test: return 1 ;
Executed by:
  • cp
executed 12 times by 1 test: return 1 ;
Executed by:
  • cp
12
537 1
executed 12 times by 1 test: return 1 ;
Executed by:
  • cp
12
538 ;
executed 12 times by 1 test: return 1 ;
Executed by:
  • cp
12
539}-
540static -
541 _Bool-
542-
543make_dir_parents_private (char const *const_dir, size_t src_offset,-
544 char const *verbose_fmt_string,-
545 struct dir_attr **attr_list, -
546 _Bool -
547 *new_dst,-
548 const struct cp_options *x)-
549{-
550 struct stat stats;-
551 char *dir;-
552 char *src;-
553 char *dst_dir;-
554 size_t dirlen;-
555-
556 do { dir = -
557 (__extension__ ({ const char *__old = (-
558 const_dir-
559 ); size_t __len = strlen (__old) + 1; char *__new = (char *) __builtin_alloca (__len); (char *) memcpy (__new, __old, __len); }))-
560 ; } while (0);-
561-
562 src = dir + src_offset;-
563-
564 dirlen = dir_len (dir);-
565 dst_dir = __builtin_alloca (dirlen + 1);-
566 memcpy (dst_dir, dir, dirlen);-
567 dst_dir[dirlen] = '\0';-
568-
569 *attr_list = -
570 ((void *)0)-
571 ;-
572-
573-
574-
575 if (stat (dst_dir, &stats) != 0
stat (dst_dir, &stats) != 0Description
TRUEevaluated 7 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 6 times by 1 test
Evaluated by:
  • cp
)
6-7
576 {-
577-
578-
579 char *slash;-
580-
581 slash = src;-
582 while (*
*slash == '/'Description
TRUEnever evaluated
FALSEevaluated 7 times by 1 test
Evaluated by:
  • cp
slash == '/'
*slash == '/'Description
TRUEnever evaluated
FALSEevaluated 7 times by 1 test
Evaluated by:
  • cp
)
0-7
583 slash++;
never executed: slash++;
0
584 while ((
(slash = (__ex...sh , '/' ))) )Description
TRUEevaluated 16 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 6 times by 1 test
Evaluated by:
  • cp
slash =
(slash = (__ex...sh , '/' ))) )Description
TRUEevaluated 16 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 6 times by 1 test
Evaluated by:
  • cp
6-16
585 (__extension__ (__builtin_constant_p (
__builtin_constant_p ( '/' )Description
TRUEevaluated 22 times by 1 test
Evaluated by:
  • cp
FALSEnever evaluated
(slash = (__ex...sh , '/' ))) )Description
TRUEevaluated 16 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 6 times by 1 test
Evaluated by:
  • cp
0-22
586 '/'
__builtin_constant_p ( '/' )Description
TRUEevaluated 22 times by 1 test
Evaluated by:
  • cp
FALSEnever evaluated
(slash = (__ex...sh , '/' ))) )Description
TRUEevaluated 16 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 6 times by 1 test
Evaluated by:
  • cp
0-22
587 )
__builtin_constant_p ( '/' )Description
TRUEevaluated 22 times by 1 test
Evaluated by:
  • cp
FALSEnever evaluated
&& !__builtin_constant_p (
!__builtin_con...nt_p ( slash )Description
TRUEevaluated 22 times by 1 test
Evaluated by:
  • cp
FALSEnever evaluated
(slash = (__ex...sh , '/' ))) )Description
TRUEevaluated 16 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 6 times by 1 test
Evaluated by:
  • cp
0-22
588 slash
!__builtin_con...nt_p ( slash )Description
TRUEevaluated 22 times by 1 test
Evaluated by:
  • cp
FALSEnever evaluated
(slash = (__ex...sh , '/' ))) )Description
TRUEevaluated 16 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 6 times by 1 test
Evaluated by:
  • cp
0-22
589 )
!__builtin_con...nt_p ( slash )Description
TRUEevaluated 22 times by 1 test
Evaluated by:
  • cp
FALSEnever evaluated
&& (
( '/' ) == '\0'Description
TRUEnever evaluated
FALSEevaluated 22 times by 1 test
Evaluated by:
  • cp
(slash = (__ex...sh , '/' ))) )Description
TRUEevaluated 16 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 6 times by 1 test
Evaluated by:
  • cp
0-22
590 '/'
( '/' ) == '\0'Description
TRUEnever evaluated
FALSEevaluated 22 times by 1 test
Evaluated by:
  • cp
(slash = (__ex...sh , '/' ))) )Description
TRUEevaluated 16 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 6 times by 1 test
Evaluated by:
  • cp
0-22
591 ) == '\0'
( '/' ) == '\0'Description
TRUEnever evaluated
FALSEevaluated 22 times by 1 test
Evaluated by:
  • cp
? (char *) __rawmemchr (
(slash = (__ex...sh , '/' ))) )Description
TRUEevaluated 16 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 6 times by 1 test
Evaluated by:
  • cp
0-22
592 slash
(slash = (__ex...sh , '/' ))) )Description
TRUEevaluated 16 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 6 times by 1 test
Evaluated by:
  • cp
6-16
593 ,
(slash = (__ex...sh , '/' ))) )Description
TRUEevaluated 16 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 6 times by 1 test
Evaluated by:
  • cp
6-16
594 '/'
(slash = (__ex...sh , '/' ))) )Description
TRUEevaluated 16 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 6 times by 1 test
Evaluated by:
  • cp
6-16
595 ) : __builtin_strchr (
(slash = (__ex...sh , '/' ))) )Description
TRUEevaluated 16 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 6 times by 1 test
Evaluated by:
  • cp
6-16
596 slash
(slash = (__ex...sh , '/' ))) )Description
TRUEevaluated 16 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 6 times by 1 test
Evaluated by:
  • cp
6-16
597 ,
(slash = (__ex...sh , '/' ))) )Description
TRUEevaluated 16 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 6 times by 1 test
Evaluated by:
  • cp
6-16
598 '/'
(slash = (__ex...sh , '/' ))) )Description
TRUEevaluated 16 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 6 times by 1 test
Evaluated by:
  • cp
6-16
599 )))
(slash = (__ex...sh , '/' ))) )Description
TRUEevaluated 16 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 6 times by 1 test
Evaluated by:
  • cp
6-16
600 )
(slash = (__ex...sh , '/' ))) )Description
TRUEevaluated 16 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 6 times by 1 test
Evaluated by:
  • cp
)
6-16
601 {-
602 struct dir_attr *new ;-
603 -
604 _Bool -
605 missing_dir;-
606-
607 *slash = '\0';-
608 missing_dir = (stat (dir, &stats) != 0);-
609-
610 if (missing_dir
missing_dirDescription
TRUEevaluated 14 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 2 times by 1 test
Evaluated by:
  • cp
|| x->preserve_ownership
x->preserve_ownershipDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • cp
FALSEnever evaluated
|| x->preserve_mode
x->preserve_modeDescription
TRUEnever evaluated
FALSEnever evaluated
0-14
611 || x->preserve_timestamps
x->preserve_timestampsDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
612 {-
613-
614-
615 struct stat src_st;-
616 int src_errno = (stat (src, &src_st) != 0
stat (src, &src_st) != 0Description
TRUEnever evaluated
FALSEevaluated 16 times by 1 test
Evaluated by:
  • cp
0-16
617 ? -
618 (*__errno_location ())-
619 -
620 : -
621 ((((
(((( src_st.st... == (0040000))Description
TRUEevaluated 15 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 1 time by 1 test
Evaluated by:
  • cp
1-15
622 src_st.st_mode
(((( src_st.st... == (0040000))Description
TRUEevaluated 15 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 1 time by 1 test
Evaluated by:
  • cp
1-15
623 )) & 0170000) == (0040000))
(((( src_st.st... == (0040000))Description
TRUEevaluated 15 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 1 time by 1 test
Evaluated by:
  • cp
1-15
624 -
625 ? 0-
626 : -
627 20-
628 );-
629 if (src_errno
src_errnoDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • cp
FALSEevaluated 15 times by 1 test
Evaluated by:
  • cp
)
1-15
630 {-
631 error (0, src_errno, -
632 dcgettext (((void *)0), -
633 "failed to get attributes of %s"-
634 , 5)-
635 ,-
636 quotearg_style (shell_escape_always_quoting_style, src));-
637 return
executed 1 time by 1 test: return 0 ;
Executed by:
  • cp
executed 1 time by 1 test: return 0 ;
Executed by:
  • cp
1
638 0
executed 1 time by 1 test: return 0 ;
Executed by:
  • cp
1
639 ;
executed 1 time by 1 test: return 0 ;
Executed by:
  • cp
1
640 }-
641-
642 new = xmalloc (sizeof *new);-
643 new->st = src_st;-
644 new->slash_offset = slash - dir;-
645 new->restore_mode = -
646 0-
647 ;-
648 new->next = *attr_list;-
649 *attr_list = new;-
650 }
executed 15 times by 1 test: end of block
Executed by:
  • cp
15
651-
652-
653 if (! set_process_security_ctx (src, dir,
! set_process_...issing_dir, x)Description
TRUEnever evaluated
FALSEevaluated 15 times by 1 test
Evaluated by:
  • cp
0-15
654 missing_dir ? new->st.st_mode : 0,
! set_process_...issing_dir, x)Description
TRUEnever evaluated
FALSEevaluated 15 times by 1 test
Evaluated by:
  • cp
0-15
655 missing_dir, x)
! set_process_...issing_dir, x)Description
TRUEnever evaluated
FALSEevaluated 15 times by 1 test
Evaluated by:
  • cp
)
0-15
656 return
never executed: return 0 ;
never executed: return 0 ;
0
657 0
never executed: return 0 ;
0
658 ;
never executed: return 0 ;
0
659-
660 if (missing_dir
missing_dirDescription
TRUEevaluated 13 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 2 times by 1 test
Evaluated by:
  • cp
)
2-13
661 {-
662 mode_t src_mode;-
663 mode_t omitted_permissions;-
664 mode_t mkdir_mode;-
665-
666-
667-
668-
669-
670-
671 *new_dst = -
672 1-
673 ;-
674 src_mode = new->st.st_mode;-
675-
676-
677-
678-
679 omitted_permissions = (src_mode-
680 & (x->preserve_ownership-
681 ? -
682 ((0400|0200|0100) >> 3) -
683 | -
684 (((0400|0200|0100) >> 3) >> 3)-
685 -
686 : x->preserve_mode-
687 ? -
688 (0200 >> 3) -
689 | -
690 ((0200 >> 3) >> 3)-
691 -
692 : 0));-
693-
694-
695-
696-
697-
698 mkdir_mode = x->explicit_no_preserve_mode
x->explicit_no_preserve_modeDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 11 times by 1 test
Evaluated by:
  • cp
?
2-11
699 ((0400|0200|0100) | ((0400|0200|0100) >> 3) | (((0400|0200|0100) >> 3) >> 3)) -
700 : src_mode;-
701 mkdir_mode &= (-
702 04000 -
703 | -
704 02000 -
705 | -
706 01000 -
707 | -
708 (0400|0200|0100) -
709 | -
710 ((0400|0200|0100) >> 3) -
711 | -
712 (((0400|0200|0100) >> 3) >> 3)-
713 ) & ~omitted_permissions;-
714 if (mkdir (dir, mkdir_mode) != 0
mkdir (dir, mkdir_mode) != 0Description
TRUEnever evaluated
FALSEevaluated 13 times by 1 test
Evaluated by:
  • cp
)
0-13
715 {-
716 error (0, -
717 (*__errno_location ())-
718 , -
719 dcgettext (((void *)0), -
720 "cannot make directory %s"-
721 , 5)-
722 ,-
723 quotearg_style (shell_escape_always_quoting_style, dir));-
724 return
never executed: return 0 ;
never executed: return 0 ;
0
725 0
never executed: return 0 ;
0
726 ;
never executed: return 0 ;
0
727 }-
728 else-
729 {-
730 if (verbose_fmt_string !=
verbose_fmt_st...!= ((void *)0)Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 11 times by 1 test
Evaluated by:
  • cp
2-11
731 ((void *)0)
verbose_fmt_st...!= ((void *)0)Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 11 times by 1 test
Evaluated by:
  • cp
2-11
732 )-
733 printf (verbose_fmt_string, src, dir);
executed 2 times by 1 test: printf (verbose_fmt_string, src, dir);
Executed by:
  • cp
2
734 }
executed 13 times by 1 test: end of block
Executed by:
  • cp
13
735-
736-
737-
738-
739-
740 if (lstat (dir, &stats)
lstat (dir, &stats)Description
TRUEnever evaluated
FALSEevaluated 13 times by 1 test
Evaluated by:
  • cp
)
0-13
741 {-
742 error (0, -
743 (*__errno_location ())-
744 , -
745 dcgettext (((void *)0), -
746 "failed to get attributes of %s"-
747 , 5)-
748 ,-
749 quotearg_style (shell_escape_always_quoting_style, dir));-
750 return
never executed: return 0 ;
never executed: return 0 ;
0
751 0
never executed: return 0 ;
0
752 ;
never executed: return 0 ;
0
753 }-
754-
755-
756 if (! x->preserve_mode
! x->preserve_modeDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 11 times by 1 test
Evaluated by:
  • cp
)
2-11
757 {-
758 if (omitted_permissions & ~stats.st_mode
omitted_permis...~stats.st_modeDescription
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • cp
)
0-2
759 omitted_permissions &= ~ cached_umask ();
never executed: omitted_permissions &= ~ cached_umask ();
0
760 if (omitted_permissions & ~stats.st_mode
omitted_permis...~stats.st_modeDescription
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • cp
0-2
761 || (
(stats.st_mode...400|0200|0100)Description
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • cp
stats.st_mode &
(stats.st_mode...400|0200|0100)Description
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • cp
0-2
762 (0400|0200|0100)
(stats.st_mode...400|0200|0100)Description
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • cp
0-2
763 ) !=
(stats.st_mode...400|0200|0100)Description
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • cp
0-2
764 (0400|0200|0100)
(stats.st_mode...400|0200|0100)Description
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • cp
0-2
765 )-
766 {-
767 new->st.st_mode = stats.st_mode | omitted_permissions;-
768 new->restore_mode = -
769 1-
770 ;-
771 }
never executed: end of block
0
772 }
executed 2 times by 1 test: end of block
Executed by:
  • cp
2
773-
774 if ((
(stats.st_mode...400|0200|0100)Description
TRUEnever evaluated
FALSEevaluated 13 times by 1 test
Evaluated by:
  • cp
stats.st_mode &
(stats.st_mode...400|0200|0100)Description
TRUEnever evaluated
FALSEevaluated 13 times by 1 test
Evaluated by:
  • cp
0-13
775 (0400|0200|0100)
(stats.st_mode...400|0200|0100)Description
TRUEnever evaluated
FALSEevaluated 13 times by 1 test
Evaluated by:
  • cp
0-13
776 ) !=
(stats.st_mode...400|0200|0100)Description
TRUEnever evaluated
FALSEevaluated 13 times by 1 test
Evaluated by:
  • cp
0-13
777 (0400|0200|0100)
(stats.st_mode...400|0200|0100)Description
TRUEnever evaluated
FALSEevaluated 13 times by 1 test
Evaluated by:
  • cp
0-13
778 )-
779 {-
780-
781-
782-
783 if (-
784 chmod
chmod (dir, st...0|0100) ) != 0Description
TRUEnever evaluated
FALSEnever evaluated
0
785 (dir, stats.st_mode |
chmod (dir, st...0|0100) ) != 0Description
TRUEnever evaluated
FALSEnever evaluated
0
786 (0400|0200|0100)
chmod (dir, st...0|0100) ) != 0Description
TRUEnever evaluated
FALSEnever evaluated
0
787 ) != 0
chmod (dir, st...0|0100) ) != 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
788 {-
789 error (0, -
790 (*__errno_location ())-
791 , -
792 dcgettext (((void *)0), -
793 "setting permissions for %s"-
794 , 5)-
795 ,-
796 quotearg_style (shell_escape_always_quoting_style, dir));-
797 return
never executed: return 0 ;
never executed: return 0 ;
0
798 0
never executed: return 0 ;
0
799 ;
never executed: return 0 ;
0
800 }-
801 }
never executed: end of block
0
802 }
executed 13 times by 1 test: end of block
Executed by:
  • cp
13
803 else if (!
! (((( stats.s... == (0040000))Description
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • cp
0-2
804 ((((
! (((( stats.s... == (0040000))Description
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • cp
0-2
805 stats.st_mode
! (((( stats.s... == (0040000))Description
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • cp
0-2
806 )) & 0170000) == (0040000))
! (((( stats.s... == (0040000))Description
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • cp
0-2
807 )-
808 {-
809 error (0, 0, -
810 dcgettext (((void *)0), -
811 "%s exists but is not a directory"-
812 , 5)-
813 ,-
814 quotearg_style (shell_escape_always_quoting_style, dir));-
815 return
never executed: return 0 ;
never executed: return 0 ;
0
816 0
never executed: return 0 ;
0
817 ;
never executed: return 0 ;
0
818 }-
819 else-
820 *
executed 2 times by 1 test: *new_dst = 0 ;
Executed by:
  • cp
new_dst =
executed 2 times by 1 test: *new_dst = 0 ;
Executed by:
  • cp
2
821 0
executed 2 times by 1 test: *new_dst = 0 ;
Executed by:
  • cp
2
822 ;
executed 2 times by 1 test: *new_dst = 0 ;
Executed by:
  • cp
2
823-
824-
825-
826 if (! *new_dst
! *new_dstDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 13 times by 1 test
Evaluated by:
  • cp
2-13
827 && (x->set_security_context
x->set_security_contextDescription
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • cp
|| x->preserve_security_context
x->preserve_security_contextDescription
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • cp
))
0-2
828 {-
829 if (! set_file_security_ctx (dir, x->preserve_security_context,
! set_file_sec...ontext, 0 , x)Description
TRUEnever evaluated
FALSEnever evaluated
0
830
! set_file_sec...ontext, 0 , x)Description
TRUEnever evaluated
FALSEnever evaluated
0
831 0
! set_file_sec...ontext, 0 , x)Description
TRUEnever evaluated
FALSEnever evaluated
0
832 , x)
! set_file_sec...ontext, 0 , x)Description
TRUEnever evaluated
FALSEnever evaluated
0
833 && x->require_preserve_context
x->require_preserve_contextDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
834 return
never executed: return 0 ;
never executed: return 0 ;
0
835 0
never executed: return 0 ;
0
836 ;
never executed: return 0 ;
0
837 }
never executed: end of block
0
838-
839 *slash++ = '/';-
840-
841-
842-
843 while (*
*slash == '/'Description
TRUEnever evaluated
FALSEevaluated 15 times by 1 test
Evaluated by:
  • cp
slash == '/'
*slash == '/'Description
TRUEnever evaluated
FALSEevaluated 15 times by 1 test
Evaluated by:
  • cp
)
0-15
844 slash++;
never executed: slash++;
0
845 }
executed 15 times by 1 test: end of block
Executed by:
  • cp
15
846 }
executed 6 times by 1 test: end of block
Executed by:
  • cp
6
847-
848-
849-
850 else if (!
! (((( stats.s... == (0040000))Description
TRUEnever evaluated
FALSEevaluated 6 times by 1 test
Evaluated by:
  • cp
0-6
851 ((((
! (((( stats.s... == (0040000))Description
TRUEnever evaluated
FALSEevaluated 6 times by 1 test
Evaluated by:
  • cp
0-6
852 stats.st_mode
! (((( stats.s... == (0040000))Description
TRUEnever evaluated
FALSEevaluated 6 times by 1 test
Evaluated by:
  • cp
0-6
853 )) & 0170000) == (0040000))
! (((( stats.s... == (0040000))Description
TRUEnever evaluated
FALSEevaluated 6 times by 1 test
Evaluated by:
  • cp
0-6
854 )-
855 {-
856 error (0, 0, -
857 dcgettext (((void *)0), -
858 "%s exists but is not a directory"-
859 , 5)-
860 , quotearg_style (shell_escape_always_quoting_style, dst_dir));-
861 return
never executed: return 0 ;
never executed: return 0 ;
0
862 0
never executed: return 0 ;
0
863 ;
never executed: return 0 ;
0
864 }-
865 else-
866 {-
867 *new_dst = -
868 0-
869 ;-
870 }
executed 6 times by 1 test: end of block
Executed by:
  • cp
6
871 return
executed 12 times by 1 test: return 1 ;
Executed by:
  • cp
executed 12 times by 1 test: return 1 ;
Executed by:
  • cp
12
872 1
executed 12 times by 1 test: return 1 ;
Executed by:
  • cp
12
873 ;
executed 12 times by 1 test: return 1 ;
Executed by:
  • cp
12
874}-
875static -
876 _Bool-
877-
878target_directory_operand (char const *file, struct stat *st, -
879 _Bool -
880 *new_dst)-
881{-
882 int err = (stat (file, st) == 0
stat (file, st) == 0Description
TRUEevaluated 306 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 386 times by 1 test
Evaluated by:
  • cp
? 0 :
306-386
883 (*__errno_location ())-
884 );-
885 -
886 _Bool -
887 is_a_dir = !err
!errDescription
TRUEevaluated 306 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 386 times by 1 test
Evaluated by:
  • cp
&&
306-386
888 ((((
(((( st->st_mo... == (0040000))Description
TRUEevaluated 44 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 262 times by 1 test
Evaluated by:
  • cp
44-262
889 st->st_mode
(((( st->st_mo... == (0040000))Description
TRUEevaluated 44 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 262 times by 1 test
Evaluated by:
  • cp
44-262
890 )) & 0170000) == (0040000))
(((( st->st_mo... == (0040000))Description
TRUEevaluated 44 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 262 times by 1 test
Evaluated by:
  • cp
44-262
891 ;-
892 if (err
errDescription
TRUEevaluated 386 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 306 times by 1 test
Evaluated by:
  • cp
)
306-386
893 {-
894 if (err !=
err != 2Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • cp
FALSEevaluated 385 times by 1 test
Evaluated by:
  • cp
1-385
895 2
err != 2Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • cp
FALSEevaluated 385 times by 1 test
Evaluated by:
  • cp
1-385
896 )-
897 ((
executed 1 time by 1 test: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, err, dcgettext (((void *)0), \"failed to access %s\", 5), quotearg_style (shell_escape_always_quoting_style, file)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , e...s_quoting_style, file)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , err, dcgettext (((void *)0), "failed to access %s" , 5) , quotearg_style (shell_escape_always_quoting_style, file)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
Executed by:
  • cp
!!sizeof (struct { _Static_assert (
executed 1 time by 1 test: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, err, dcgettext (((void *)0), \"failed to access %s\", 5), quotearg_style (shell_escape_always_quoting_style, file)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , e...s_quoting_style, file)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , err, dcgettext (((void *)0), "failed to access %s" , 5) , quotearg_style (shell_escape_always_quoting_style, file)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
Executed by:
  • cp
1
898 1
executed 1 time by 1 test: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, err, dcgettext (((void *)0), \"failed to access %s\", 5), quotearg_style (shell_escape_always_quoting_style, file)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , e...s_quoting_style, file)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , err, dcgettext (((void *)0), "failed to access %s" , 5) , quotearg_style (shell_escape_always_quoting_style, file)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
Executed by:
  • cp
1
899 , "verify_expr (" "1" ", " "(error (1, err, dcgettext (((void *)0), \"failed to access %s\", 5), quotearg_style (shell_escape_always_quoting_style, file)), assume (false))" ")"); int _gl_dummy; })) ? ((error (
executed 1 time by 1 test: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, err, dcgettext (((void *)0), \"failed to access %s\", 5), quotearg_style (shell_escape_always_quoting_style, file)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , e...s_quoting_style, file)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , err, dcgettext (((void *)0), "failed to access %s" , 5) , quotearg_style (shell_escape_always_quoting_style, file)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
Executed by:
  • cp
1
900 1
executed 1 time by 1 test: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, err, dcgettext (((void *)0), \"failed to access %s\", 5), quotearg_style (shell_escape_always_quoting_style, file)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , e...s_quoting_style, file)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , err, dcgettext (((void *)0), "failed to access %s" , 5) , quotearg_style (shell_escape_always_quoting_style, file)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
Executed by:
  • cp
1
901 , err,
executed 1 time by 1 test: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, err, dcgettext (((void *)0), \"failed to access %s\", 5), quotearg_style (shell_escape_always_quoting_style, file)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , e...s_quoting_style, file)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , err, dcgettext (((void *)0), "failed to access %s" , 5) , quotearg_style (shell_escape_always_quoting_style, file)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
Executed by:
  • cp
1
902 dcgettext (((void *)0),
executed 1 time by 1 test: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, err, dcgettext (((void *)0), \"failed to access %s\", 5), quotearg_style (shell_escape_always_quoting_style, file)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , e...s_quoting_style, file)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , err, dcgettext (((void *)0), "failed to access %s" , 5) , quotearg_style (shell_escape_always_quoting_style, file)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
Executed by:
  • cp
1
903 "failed to access %s"
executed 1 time by 1 test: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, err, dcgettext (((void *)0), \"failed to access %s\", 5), quotearg_style (shell_escape_always_quoting_style, file)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , e...s_quoting_style, file)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , err, dcgettext (((void *)0), "failed to access %s" , 5) , quotearg_style (shell_escape_always_quoting_style, file)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
Executed by:
  • cp
1
904 , 5)
executed 1 time by 1 test: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, err, dcgettext (((void *)0), \"failed to access %s\", 5), quotearg_style (shell_escape_always_quoting_style, file)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , e...s_quoting_style, file)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , err, dcgettext (((void *)0), "failed to access %s" , 5) , quotearg_style (shell_escape_always_quoting_style, file)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
Executed by:
  • cp
1
905 , quotearg_style (shell_escape_always_quoting_style, file)), ((
executed 1 time by 1 test: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, err, dcgettext (((void *)0), \"failed to access %s\", 5), quotearg_style (shell_escape_always_quoting_style, file)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , e...s_quoting_style, file)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , err, dcgettext (((void *)0), "failed to access %s" , 5) , quotearg_style (shell_escape_always_quoting_style, file)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
Executed by:
  • cp
1
906 0
executed 1 time by 1 test: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, err, dcgettext (((void *)0), \"failed to access %s\", 5), quotearg_style (shell_escape_always_quoting_style, file)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , e...s_quoting_style, file)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , err, dcgettext (((void *)0), "failed to access %s" , 5) , quotearg_style (shell_escape_always_quoting_style, file)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
Executed by:
  • cp
1
907 ) ? (void) 0 : __builtin_unreachable ()))) : ((error (
executed 1 time by 1 test: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, err, dcgettext (((void *)0), \"failed to access %s\", 5), quotearg_style (shell_escape_always_quoting_style, file)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , e...s_quoting_style, file)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , err, dcgettext (((void *)0), "failed to access %s" , 5) , quotearg_style (shell_escape_always_quoting_style, file)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
Executed by:
  • cp
1
908 1
executed 1 time by 1 test: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, err, dcgettext (((void *)0), \"failed to access %s\", 5), quotearg_style (shell_escape_always_quoting_style, file)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , e...s_quoting_style, file)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , err, dcgettext (((void *)0), "failed to access %s" , 5) , quotearg_style (shell_escape_always_quoting_style, file)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
Executed by:
  • cp
1
909 , err,
executed 1 time by 1 test: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, err, dcgettext (((void *)0), \"failed to access %s\", 5), quotearg_style (shell_escape_always_quoting_style, file)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , e...s_quoting_style, file)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , err, dcgettext (((void *)0), "failed to access %s" , 5) , quotearg_style (shell_escape_always_quoting_style, file)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
Executed by:
  • cp
1
910 dcgettext (((void *)0),
executed 1 time by 1 test: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, err, dcgettext (((void *)0), \"failed to access %s\", 5), quotearg_style (shell_escape_always_quoting_style, file)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , e...s_quoting_style, file)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , err, dcgettext (((void *)0), "failed to access %s" , 5) , quotearg_style (shell_escape_always_quoting_style, file)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
Executed by:
  • cp
1
911 "failed to access %s"
executed 1 time by 1 test: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, err, dcgettext (((void *)0), \"failed to access %s\", 5), quotearg_style (shell_escape_always_quoting_style, file)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , e...s_quoting_style, file)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , err, dcgettext (((void *)0), "failed to access %s" , 5) , quotearg_style (shell_escape_always_quoting_style, file)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
Executed by:
  • cp
1
912 , 5)
executed 1 time by 1 test: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, err, dcgettext (((void *)0), \"failed to access %s\", 5), quotearg_style (shell_escape_always_quoting_style, file)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , e...s_quoting_style, file)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , err, dcgettext (((void *)0), "failed to access %s" , 5) , quotearg_style (shell_escape_always_quoting_style, file)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
Executed by:
  • cp
1
913 , quotearg_style (shell_escape_always_quoting_style, file)), ((
executed 1 time by 1 test: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, err, dcgettext (((void *)0), \"failed to access %s\", 5), quotearg_style (shell_escape_always_quoting_style, file)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , e...s_quoting_style, file)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , err, dcgettext (((void *)0), "failed to access %s" , 5) , quotearg_style (shell_escape_always_quoting_style, file)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
Executed by:
  • cp
1
914 0
executed 1 time by 1 test: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, err, dcgettext (((void *)0), \"failed to access %s\", 5), quotearg_style (shell_escape_always_quoting_style, file)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , e...s_quoting_style, file)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , err, dcgettext (((void *)0), "failed to access %s" , 5) , quotearg_style (shell_escape_always_quoting_style, file)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
Executed by:
  • cp
1
915 ) ? (void) 0 : __builtin_unreachable ()))));
executed 1 time by 1 test: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, err, dcgettext (((void *)0), \"failed to access %s\", 5), quotearg_style (shell_escape_always_quoting_style, file)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , e...s_quoting_style, file)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , err, dcgettext (((void *)0), "failed to access %s" , 5) , quotearg_style (shell_escape_always_quoting_style, file)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
Executed by:
  • cp
1
916 *new_dst = -
917 1-
918 ;-
919 }
executed 385 times by 1 test: end of block
Executed by:
  • cp
385
920 return
executed 691 times by 1 test: return is_a_dir;
Executed by:
  • cp
is_a_dir;
executed 691 times by 1 test: return is_a_dir;
Executed by:
  • cp
691
921}-
922-
923-
924-
925-
926static -
927 _Bool-
928-
929do_copy (int n_files, char **file, const char *target_directory,-
930 -
931 _Bool -
932 no_target_directory, struct cp_options *x)-
933{-
934 struct stat sb;-
935 -
936 _Bool -
937 new_dst = -
938 0-
939 ;-
940 -
941 _Bool -
942 ok = -
943 1-
944 ;-
945-
946 if (n_files <= !target_directory
n_files <= !target_directoryDescription
TRUEnever evaluated
FALSEevaluated 692 times by 1 test
Evaluated by:
  • cp
)
0-692
947 {-
948 if (n_files <= 0
n_files <= 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
949 error (0, 0,
never executed: error (0, 0, dcgettext (((void *)0), "missing file operand" , 5) );
0
950 dcgettext (((void *)0),
never executed: error (0, 0, dcgettext (((void *)0), "missing file operand" , 5) );
0
951 "missing file operand"
never executed: error (0, 0, dcgettext (((void *)0), "missing file operand" , 5) );
0
952 , 5)
never executed: error (0, 0, dcgettext (((void *)0), "missing file operand" , 5) );
0
953 );
never executed: error (0, 0, dcgettext (((void *)0), "missing file operand" , 5) );
0
954 else-
955 error (0, 0,
never executed: error (0, 0, dcgettext (((void *)0), "missing destination file operand after %s" , 5) , quotearg_style (shell_escape_always_quoting_style, file[0]));
0
956 dcgettext (((void *)0),
never executed: error (0, 0, dcgettext (((void *)0), "missing destination file operand after %s" , 5) , quotearg_style (shell_escape_always_quoting_style, file[0]));
0
957 "missing destination file operand after %s"
never executed: error (0, 0, dcgettext (((void *)0), "missing destination file operand after %s" , 5) , quotearg_style (shell_escape_always_quoting_style, file[0]));
0
958 , 5)
never executed: error (0, 0, dcgettext (((void *)0), "missing destination file operand after %s" , 5) , quotearg_style (shell_escape_always_quoting_style, file[0]));
0
959 ,
never executed: error (0, 0, dcgettext (((void *)0), "missing destination file operand after %s" , 5) , quotearg_style (shell_escape_always_quoting_style, file[0]));
0
960 quotearg_style (shell_escape_always_quoting_style, file[0]));
never executed: error (0, 0, dcgettext (((void *)0), "missing destination file operand after %s" , 5) , quotearg_style (shell_escape_always_quoting_style, file[0]));
0
961 usage (-
962 1-
963 );-
964 }
never executed: end of block
0
965-
966 if (no_target_directory
no_target_directoryDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 690 times by 1 test
Evaluated by:
  • cp
)
2-690
967 {-
968 if (target_directory
target_directoryDescription
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • cp
)
0-2
969 ((
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"cannot combine --target-directory (-t) \" \"and --no-target-directory (-T)\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcg...target-directory (-T)" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "cannot combine --target-directory (-t) " "and --no-target-directory (-T)" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ;
!!sizeof (struct { _Static_assert (
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"cannot combine --target-directory (-t) \" \"and --no-target-directory (-T)\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcg...target-directory (-T)" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "cannot combine --target-directory (-t) " "and --no-target-directory (-T)" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ;
0
970 1
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"cannot combine --target-directory (-t) \" \"and --no-target-directory (-T)\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcg...target-directory (-T)" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "cannot combine --target-directory (-t) " "and --no-target-directory (-T)" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ;
0
971 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"cannot combine --target-directory (-t) \" \"and --no-target-directory (-T)\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error (
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"cannot combine --target-directory (-t) \" \"and --no-target-directory (-T)\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcg...target-directory (-T)" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "cannot combine --target-directory (-t) " "and --no-target-directory (-T)" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ;
0
972 1
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"cannot combine --target-directory (-t) \" \"and --no-target-directory (-T)\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcg...target-directory (-T)" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "cannot combine --target-directory (-t) " "and --no-target-directory (-T)" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ;
0
973 , 0,
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"cannot combine --target-directory (-t) \" \"and --no-target-directory (-T)\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcg...target-directory (-T)" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "cannot combine --target-directory (-t) " "and --no-target-directory (-T)" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ;
0
974 dcgettext (((void *)0),
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"cannot combine --target-directory (-t) \" \"and --no-target-directory (-T)\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcg...target-directory (-T)" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "cannot combine --target-directory (-t) " "and --no-target-directory (-T)" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ;
0
975 "cannot combine --target-directory (-t) " "and --no-target-directory (-T)"
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"cannot combine --target-directory (-t) \" \"and --no-target-directory (-T)\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcg...target-directory (-T)" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "cannot combine --target-directory (-t) " "and --no-target-directory (-T)" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ;
0
976 , 5)
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"cannot combine --target-directory (-t) \" \"and --no-target-directory (-T)\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcg...target-directory (-T)" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "cannot combine --target-directory (-t) " "and --no-target-directory (-T)" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ;
0
977 ), ((
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"cannot combine --target-directory (-t) \" \"and --no-target-directory (-T)\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcg...target-directory (-T)" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "cannot combine --target-directory (-t) " "and --no-target-directory (-T)" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ;
0
978 0
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"cannot combine --target-directory (-t) \" \"and --no-target-directory (-T)\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcg...target-directory (-T)" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "cannot combine --target-directory (-t) " "and --no-target-directory (-T)" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ;
0
979 ) ? (void) 0 : __builtin_unreachable ()))) : ((error (
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"cannot combine --target-directory (-t) \" \"and --no-target-directory (-T)\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcg...target-directory (-T)" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "cannot combine --target-directory (-t) " "and --no-target-directory (-T)" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ;
0
980 1
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"cannot combine --target-directory (-t) \" \"and --no-target-directory (-T)\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcg...target-directory (-T)" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "cannot combine --target-directory (-t) " "and --no-target-directory (-T)" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ;
0
981 , 0,
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"cannot combine --target-directory (-t) \" \"and --no-target-directory (-T)\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcg...target-directory (-T)" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "cannot combine --target-directory (-t) " "and --no-target-directory (-T)" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ;
0
982 dcgettext (((void *)0),
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"cannot combine --target-directory (-t) \" \"and --no-target-directory (-T)\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcg...target-directory (-T)" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "cannot combine --target-directory (-t) " "and --no-target-directory (-T)" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ;
0
983 "cannot combine --target-directory (-t) " "and --no-target-directory (-T)"
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"cannot combine --target-directory (-t) \" \"and --no-target-directory (-T)\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcg...target-directory (-T)" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "cannot combine --target-directory (-t) " "and --no-target-directory (-T)" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ;
0
984 , 5)
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"cannot combine --target-directory (-t) \" \"and --no-target-directory (-T)\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcg...target-directory (-T)" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "cannot combine --target-directory (-t) " "and --no-target-directory (-T)" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ;
0
985 ), ((
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"cannot combine --target-directory (-t) \" \"and --no-target-directory (-T)\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcg...target-directory (-T)" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "cannot combine --target-directory (-t) " "and --no-target-directory (-T)" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ;
0
986 0
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"cannot combine --target-directory (-t) \" \"and --no-target-directory (-T)\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcg...target-directory (-T)" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "cannot combine --target-directory (-t) " "and --no-target-directory (-T)" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ;
0
987 ) ? (void) 0 : __builtin_unreachable ()))))
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"cannot combine --target-directory (-t) \" \"and --no-target-directory (-T)\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcg...target-directory (-T)" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "cannot combine --target-directory (-t) " "and --no-target-directory (-T)" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ;
0
9880
989 ;
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"cannot combine --target-directory (-t) \" \"and --no-target-directory (-T)\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcg...target-directory (-T)" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "cannot combine --target-directory (-t) " "and --no-target-directory (-T)" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ;
0
990 if (2 < n_files
2 < n_filesDescription
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • cp
)
0-2
991 {-
992 error (0, 0, -
993 dcgettext (((void *)0), -
994 "extra operand %s"-
995 , 5)-
996 , quotearg_style (shell_escape_always_quoting_style, file[2]));-
997 usage (-
998 1-
999 );-
1000 }
never executed: end of block
0
1001-
1002 (__extension__ ({ __typeof__ (target_directory_operand (file[n_files -1], &sb, &new_dst)) __x = (target_directory_operand (file[n_files -1], &sb, &new_dst)); (void) __x; }));-
1003 }
executed 2 times by 1 test: end of block
Executed by:
  • cp
2
1004 else if (!target_directory
!target_directoryDescription
TRUEevaluated 690 times by 1 test
Evaluated by:
  • cp
FALSEnever evaluated
)
0-690
1005 {-
1006 if (2 <= n_files
2 <= n_filesDescription
TRUEevaluated 690 times by 1 test
Evaluated by:
  • cp
FALSEnever evaluated
0-690
1007 && target_directory_operand (file[n_files - 1], &sb, &new_dst)
target_directo...&sb, &new_dst)Description
TRUEevaluated 44 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 645 times by 1 test
Evaluated by:
  • cp
)
44-645
1008 target_directory = file[--n_files];
executed 44 times by 1 test: target_directory = file[--n_files];
Executed by:
  • cp
44
1009 else if (2 < n_files
2 < n_filesDescription
TRUEnever evaluated
FALSEevaluated 645 times by 1 test
Evaluated by:
  • cp
)
0-645
1010 ((
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"target %s is not a directory\", 5), quotearg_style (shell_escape_always_quoting_style, file[n_files - 1])), assume (false))" ")"); int _gl_dummy; }...)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "target %s is not a directory" , 5) , quotearg_style (shell_escape_always_quoting_style, file[n_files - 1])), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ;
!!sizeof (struct { _Static_assert (
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"target %s is not a directory\", 5), quotearg_style (shell_escape_always_quoting_style, file[n_files - 1])), assume (false))" ")"); int _gl_dummy; }...)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "target %s is not a directory" , 5) , quotearg_style (shell_escape_always_quoting_style, file[n_files - 1])), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ;
0
1011 1
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"target %s is not a directory\", 5), quotearg_style (shell_escape_always_quoting_style, file[n_files - 1])), assume (false))" ")"); int _gl_dummy; }...)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "target %s is not a directory" , 5) , quotearg_style (shell_escape_always_quoting_style, file[n_files - 1])), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ;
0
1012 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"target %s is not a directory\", 5), quotearg_style (shell_escape_always_quoting_style, file[n_files - 1])), assume (false))" ")"); int _gl_dummy; })) ? ((error (
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"target %s is not a directory\", 5), quotearg_style (shell_escape_always_quoting_style, file[n_files - 1])), assume (false))" ")"); int _gl_dummy; }...)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "target %s is not a directory" , 5) , quotearg_style (shell_escape_always_quoting_style, file[n_files - 1])), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ;
0
1013 1
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"target %s is not a directory\", 5), quotearg_style (shell_escape_always_quoting_style, file[n_files - 1])), assume (false))" ")"); int _gl_dummy; }...)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "target %s is not a directory" , 5) , quotearg_style (shell_escape_always_quoting_style, file[n_files - 1])), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ;
0
1014 , 0,
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"target %s is not a directory\", 5), quotearg_style (shell_escape_always_quoting_style, file[n_files - 1])), assume (false))" ")"); int _gl_dummy; }...)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "target %s is not a directory" , 5) , quotearg_style (shell_escape_always_quoting_style, file[n_files - 1])), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ;
0
1015 dcgettext (((void *)0),
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"target %s is not a directory\", 5), quotearg_style (shell_escape_always_quoting_style, file[n_files - 1])), assume (false))" ")"); int _gl_dummy; }...)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "target %s is not a directory" , 5) , quotearg_style (shell_escape_always_quoting_style, file[n_files - 1])), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ;
0
1016 "target %s is not a directory"
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"target %s is not a directory\", 5), quotearg_style (shell_escape_always_quoting_style, file[n_files - 1])), assume (false))" ")"); int _gl_dummy; }...)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "target %s is not a directory" , 5) , quotearg_style (shell_escape_always_quoting_style, file[n_files - 1])), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ;
0
1017 , 5)
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"target %s is not a directory\", 5), quotearg_style (shell_escape_always_quoting_style, file[n_files - 1])), assume (false))" ")"); int _gl_dummy; }...)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "target %s is not a directory" , 5) , quotearg_style (shell_escape_always_quoting_style, file[n_files - 1])), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ;
0
1018 , quotearg_style (shell_escape_always_quoting_style, file[n_files - 1])), ((
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"target %s is not a directory\", 5), quotearg_style (shell_escape_always_quoting_style, file[n_files - 1])), assume (false))" ")"); int _gl_dummy; }...)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "target %s is not a directory" , 5) , quotearg_style (shell_escape_always_quoting_style, file[n_files - 1])), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ;
0
1019 0
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"target %s is not a directory\", 5), quotearg_style (shell_escape_always_quoting_style, file[n_files - 1])), assume (false))" ")"); int _gl_dummy; }...)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "target %s is not a directory" , 5) , quotearg_style (shell_escape_always_quoting_style, file[n_files - 1])), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ;
0
1020 ) ? (void) 0 : __builtin_unreachable ()))) : ((error (
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"target %s is not a directory\", 5), quotearg_style (shell_escape_always_quoting_style, file[n_files - 1])), assume (false))" ")"); int _gl_dummy; }...)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "target %s is not a directory" , 5) , quotearg_style (shell_escape_always_quoting_style, file[n_files - 1])), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ;
0
1021 1
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"target %s is not a directory\", 5), quotearg_style (shell_escape_always_quoting_style, file[n_files - 1])), assume (false))" ")"); int _gl_dummy; }...)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "target %s is not a directory" , 5) , quotearg_style (shell_escape_always_quoting_style, file[n_files - 1])), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ;
0
1022 , 0,
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"target %s is not a directory\", 5), quotearg_style (shell_escape_always_quoting_style, file[n_files - 1])), assume (false))" ")"); int _gl_dummy; }...)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "target %s is not a directory" , 5) , quotearg_style (shell_escape_always_quoting_style, file[n_files - 1])), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ;
0
1023 dcgettext (((void *)0),
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"target %s is not a directory\", 5), quotearg_style (shell_escape_always_quoting_style, file[n_files - 1])), assume (false))" ")"); int _gl_dummy; }...)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "target %s is not a directory" , 5) , quotearg_style (shell_escape_always_quoting_style, file[n_files - 1])), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ;
0
1024 "target %s is not a directory"
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"target %s is not a directory\", 5), quotearg_style (shell_escape_always_quoting_style, file[n_files - 1])), assume (false))" ")"); int _gl_dummy; }...)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "target %s is not a directory" , 5) , quotearg_style (shell_escape_always_quoting_style, file[n_files - 1])), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ;
0
1025 , 5)
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"target %s is not a directory\", 5), quotearg_style (shell_escape_always_quoting_style, file[n_files - 1])), assume (false))" ")"); int _gl_dummy; }...)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "target %s is not a directory" , 5) , quotearg_style (shell_escape_always_quoting_style, file[n_files - 1])), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ;
0
1026 , quotearg_style (shell_escape_always_quoting_style, file[n_files - 1])), ((
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"target %s is not a directory\", 5), quotearg_style (shell_escape_always_quoting_style, file[n_files - 1])), assume (false))" ")"); int _gl_dummy; }...)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "target %s is not a directory" , 5) , quotearg_style (shell_escape_always_quoting_style, file[n_files - 1])), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ;
0
1027 0
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"target %s is not a directory\", 5), quotearg_style (shell_escape_always_quoting_style, file[n_files - 1])), assume (false))" ")"); int _gl_dummy; }...)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "target %s is not a directory" , 5) , quotearg_style (shell_escape_always_quoting_style, file[n_files - 1])), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ;
0
1028 ) ? (void) 0 : __builtin_unreachable ()))))
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"target %s is not a directory\", 5), quotearg_style (shell_escape_always_quoting_style, file[n_files - 1])), assume (false))" ")"); int _gl_dummy; }...)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "target %s is not a directory" , 5) , quotearg_style (shell_escape_always_quoting_style, file[n_files - 1])), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ;
0
1029 ;
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"target %s is not a directory\", 5), quotearg_style (shell_escape_always_quoting_style, file[n_files - 1])), assume (false))" ")"); int _gl_dummy; }...)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "target %s is not a directory" , 5) , quotearg_style (shell_escape_always_quoting_style, file[n_files - 1])), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ;
0
1030 }
executed 689 times by 1 test: end of block
Executed by:
  • cp
689
1031-
1032 if (target_directory
target_directoryDescription
TRUEevaluated 44 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 647 times by 1 test
Evaluated by:
  • cp
)
44-647
1033 {-
1034-
1035-
1036-
1037-
1038-
1039-
1040-
1041 if (2 <= n_files
2 <= n_filesDescription
TRUEevaluated 19 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 25 times by 1 test
Evaluated by:
  • cp
)
19-25
1042 {-
1043 dest_info_init (x);-
1044 src_info_init (x);-
1045 }
executed 19 times by 1 test: end of block
Executed by:
  • cp
19
1046-
1047 for (int i = 0; i < n_files
i < n_filesDescription
TRUEevaluated 65 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 44 times by 1 test
Evaluated by:
  • cp
; i++)
44-65
1048 {-
1049 char *dst_name;-
1050 -
1051 _Bool -
1052 parent_exists = -
1053 1-
1054 ;-
1055 struct dir_attr *attr_list;-
1056 char *arg_in_concat = -
1057 ((void *)0)-
1058 ;-
1059 char *arg = file[i];-
1060-
1061-
1062-
1063 if (remove_trailing_slashes
remove_trailing_slashesDescription
TRUEnever evaluated
FALSEevaluated 65 times by 1 test
Evaluated by:
  • cp
)
0-65
1064 strip_trailing_slashes (arg);
never executed: strip_trailing_slashes (arg);
0
1065-
1066 if (parents_option
parents_optionDescription
TRUEevaluated 13 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 52 times by 1 test
Evaluated by:
  • cp
)
13-52
1067 {-
1068 char *arg_no_trailing_slash;-
1069-
1070-
1071-
1072-
1073-
1074-
1075 do { arg_no_trailing_slash = -
1076 (__extension__ ({ const char *__old = (-
1077 arg-
1078 ); size_t __len = strlen (__old) + 1; char *__new = (char *) __builtin_alloca (__len); (char *) memcpy (__new, __old, __len); }))-
1079 ; } while (0);-
1080 strip_trailing_slashes (arg_no_trailing_slash);-
1081-
1082-
1083 dst_name = file_name_concat (target_directory,-
1084 arg_no_trailing_slash,-
1085 &arg_in_concat);-
1086-
1087-
1088-
1089-
1090 parent_exists =-
1091 (make_dir_parents_private-
1092 (dst_name, arg_in_concat - dst_name,-
1093 (x->verbose ? "%s -> %s\n" : -
1094 ((void *)0)-
1095 ),-
1096 &attr_list, &new_dst, x));-
1097 }
executed 13 times by 1 test: end of block
Executed by:
  • cp
13
1098 else-
1099 {-
1100 char *arg_base;-
1101-
1102 do { arg_base = -
1103 (__extension__ ({ const char *__old = (-
1104 last_component (arg)-
1105 ); size_t __len = strlen (__old) + 1; char *__new = (char *) __builtin_alloca (__len); (char *) memcpy (__new, __old, __len); }))-
1106 ; } while (0);-
1107 strip_trailing_slashes (arg_base);-
1108-
1109 dst_name = ((
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 52 times by 1 test
Evaluated by:
  • cp
0-52
1110 __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 52 times by 1 test
Evaluated by:
  • cp
0-52
1111 arg_base
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 52 times by 1 test
Evaluated by:
  • cp
0-52
1112 ) && __builtin_constant_p (
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 52 times by 1 test
Evaluated by:
  • cp
0-52
1113 ".."
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 52 times by 1 test
Evaluated by:
  • cp
0-52
1114 ) && (__s1_len = __builtin_strlen (
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 52 times by 1 test
Evaluated by:
  • cp
0-52
1115 arg_base
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 52 times by 1 test
Evaluated by:
  • cp
0-52
1116 ), __s2_len = __builtin_strlen (
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 52 times by 1 test
Evaluated by:
  • cp
0-52
1117 ".."
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 52 times by 1 test
Evaluated by:
  • cp
0-52
1118 ), (!((size_t)(const void *)((
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 52 times by 1 test
Evaluated by:
  • cp
0-52
1119 arg_base
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 52 times by 1 test
Evaluated by:
  • cp
0-52
1120 ) + 1) - (size_t)(const void *)(
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 52 times by 1 test
Evaluated by:
  • cp
0-52
1121 arg_base
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 52 times by 1 test
Evaluated by:
  • cp
0-52
1122 ) == 1) || __s1_len >= 4) && (!((size_t)(const void *)((
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 52 times by 1 test
Evaluated by:
  • cp
0-52
1123 ".."
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 52 times by 1 test
Evaluated by:
  • cp
0-52
1124 ) + 1) - (size_t)(const void *)(
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 52 times by 1 test
Evaluated by:
  • cp
0-52
1125 ".."
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 52 times by 1 test
Evaluated by:
  • cp
0-52
1126 ) == 1) || __s2_len >= 4)) ? __builtin_strcmp (
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 52 times by 1 test
Evaluated by:
  • cp
0-52
1127 arg_base
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 52 times by 1 test
Evaluated by:
  • cp
0-52
1128 ,
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 52 times by 1 test
Evaluated by:
  • cp
0-52
1129 ".."
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 52 times by 1 test
Evaluated by:
  • cp
0-52
1130 ) : (__builtin_constant_p (
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 52 times by 1 test
Evaluated by:
  • cp
0-52
1131 arg_base
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 52 times by 1 test
Evaluated by:
  • cp
0-52
1132 ) && ((size_t)(const void *)((
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 52 times by 1 test
Evaluated by:
  • cp
0-52
1133 arg_base
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 52 times by 1 test
Evaluated by:
  • cp
0-52
1134 ) + 1) - (size_t)(const void *)(
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 52 times by 1 test
Evaluated by:
  • cp
0-52
1135 arg_base
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 52 times by 1 test
Evaluated by:
  • cp
0-52
1136 ) == 1) && (__s1_len = __builtin_strlen (
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 52 times by 1 test
Evaluated by:
  • cp
0-52
1137 arg_base
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 52 times by 1 test
Evaluated by:
  • cp
0-52
1138 ), __s1_len < 4) ? (__builtin_constant_p (
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 52 times by 1 test
Evaluated by:
  • cp
0-52
1139 ".."
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 52 times by 1 test
Evaluated by:
  • cp
0-52
1140 ) && ((size_t)(const void *)((
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 52 times by 1 test
Evaluated by:
  • cp
0-52
1141 ".."
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 52 times by 1 test
Evaluated by:
  • cp
0-52
1142 ) + 1) - (size_t)(const void *)(
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 52 times by 1 test
Evaluated by:
  • cp
0-52
1143 ".."
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 52 times by 1 test
Evaluated by:
  • cp
0-52
1144 ) == 1) ? __builtin_strcmp (
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 52 times by 1 test
Evaluated by:
  • cp
0-52
1145 arg_base
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 52 times by 1 test
Evaluated by:
  • cp
0-52
1146 ,
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 52 times by 1 test
Evaluated by:
  • cp
0-52
1147 ".."
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 52 times by 1 test
Evaluated by:
  • cp
0-52
1148 ) : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 52 times by 1 test
Evaluated by:
  • cp
0-52
1149 ".."
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 52 times by 1 test
Evaluated by:
  • cp
0-52
1150 ); int __result = (((const unsigned char *) (const char *) (
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 52 times by 1 test
Evaluated by:
  • cp
0-52
1151 arg_base
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 52 times by 1 test
Evaluated by:
  • cp
0-52
1152 ))[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
TRUEnever evaluated
FALSEevaluated 52 times by 1 test
Evaluated by:
  • cp
0-52
1153 arg_base
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 52 times by 1 test
Evaluated by:
  • cp
0-52
1154 ))[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
TRUEnever evaluated
FALSEevaluated 52 times by 1 test
Evaluated by:
  • cp
0-52
1155 arg_base
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 52 times by 1 test
Evaluated by:
  • cp
0-52
1156 ))[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 *) ( arg_base ))[3] - __s2[3]);
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 52 times by 1 test
Evaluated by:
  • cp
0-52
1157 arg_base
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 52 times by 1 test
Evaluated by:
  • cp
never executed: __result = (((const unsigned char *) (const char *) ( arg_base ))[3] - __s2[3]);
0-52
1158 ))[3] - __s2[3]);
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 52 times by 1 test
Evaluated by:
  • cp
never executed: __result = (((const unsigned char *) (const char *) ( arg_base ))[3] - __s2[3]);
}
never executed: end of block
}
never executed: end of block
__result; }))) : (__builtin_constant_p (
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 52 times by 1 test
Evaluated by:
  • cp
0-52
1159 ".."
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 52 times by 1 test
Evaluated by:
  • cp
0-52
1160 ) && ((size_t)(const void *)((
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 52 times by 1 test
Evaluated by:
  • cp
0-52
1161 ".."
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 52 times by 1 test
Evaluated by:
  • cp
0-52
1162 ) + 1) - (size_t)(const void *)(
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 52 times by 1 test
Evaluated by:
  • cp
0-52
1163 ".."
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 52 times by 1 test
Evaluated by:
  • cp
0-52
1164 ) == 1) && (__s2_len = __builtin_strlen (
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 52 times by 1 test
Evaluated by:
  • cp
0-52
1165 ".."
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 52 times by 1 test
Evaluated by:
  • cp
0-52
1166 ), __s2_len < 4) ? (__builtin_constant_p (
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 52 times by 1 test
Evaluated by:
  • cp
0-52
1167 arg_base
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 52 times by 1 test
Evaluated by:
  • cp
0-52
1168 ) && ((size_t)(const void *)((
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 52 times by 1 test
Evaluated by:
  • cp
0-52
1169 arg_base
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 52 times by 1 test
Evaluated by:
  • cp
0-52
1170 ) + 1) - (size_t)(const void *)(
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 52 times by 1 test
Evaluated by:
  • cp
0-52
1171 arg_base
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 52 times by 1 test
Evaluated by:
  • cp
0-52
1172 ) == 1) ? __builtin_strcmp (
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 52 times by 1 test
Evaluated by:
  • cp
0-52
1173 arg_base
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 52 times by 1 test
Evaluated by:
  • cp
0-52
1174 ,
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 52 times by 1 test
Evaluated by:
  • cp
0-52
1175 ".."
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 52 times by 1 test
Evaluated by:
  • cp
0-52
1176 ) : -(__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 52 times by 1 test
Evaluated by:
  • cp
0-52
1177 arg_base
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 52 times by 1 test
Evaluated by:
  • cp
0-52
1178 ); int __result = (((const unsigned char *) (const char *) (
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 52 times by 1 test
Evaluated by:
  • cp
0-52
1179 ".."
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 52 times by 1 test
Evaluated by:
  • cp
0-52
1180 ))[0] - __s2[0]); if (__s2_len > 0
__s2_len > 0Description
TRUEevaluated 52 times by 1 test
Evaluated by:
  • cp
FALSEnever evaluated
&& __result == 0
__result == 0Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 50 times by 1 test
Evaluated by:
  • cp
) { __result = (((const unsigned char *) (const char *) (
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 52 times by 1 test
Evaluated by:
  • cp
0-52
1181 ".."
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 52 times by 1 test
Evaluated by:
  • cp
0-52
1182 ))[1] - __s2[1]); if (__s2_len > 1
__s2_len > 1Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • cp
FALSEnever evaluated
&& __result == 0
__result == 0Description
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • cp
) { __result = (((const unsigned char *) (const char *) (
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 52 times by 1 test
Evaluated by:
  • cp
0-52
1183 ".."
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 52 times by 1 test
Evaluated by:
  • cp
0-52
1184 ))[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 *) ( ".." ))[3] - __s2[3]);
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 52 times by 1 test
Evaluated by:
  • cp
0-52
1185 ".."
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 52 times by 1 test
Evaluated by:
  • cp
never executed: __result = (((const unsigned char *) (const char *) ( ".." ))[3] - __s2[3]);
0-52
1186 ))[3] - __s2[3]);
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 52 times by 1 test
Evaluated by:
  • cp
never executed: __result = (((const unsigned char *) (const char *) ( ".." ))[3] - __s2[3]);
}
never executed: end of block
}
executed 2 times by 1 test: end of block
Executed by:
  • cp
__result; }))) : __builtin_strcmp (
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 52 times by 1 test
Evaluated by:
  • cp
0-52
1187 arg_base
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 52 times by 1 test
Evaluated by:
  • cp
0-52
1188 ,
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 52 times by 1 test
Evaluated by:
  • cp
0-52
1189 ".."
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 52 times by 1 test
Evaluated by:
  • cp
0-52
1190 )))); })
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 52 times by 1 test
Evaluated by:
  • cp
0-52
1191 == 0)
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 52 times by 1 test
Evaluated by:
  • cp
0-52
1192 ? xstrdup (target_directory)-
1193 : file_name_concat (target_directory, arg_base,-
1194 -
1195 ((void *)0)-
1196 ));-
1197 }
executed 52 times by 1 test: end of block
Executed by:
  • cp
52
1198-
1199 if (!parent_exists
!parent_existsDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • cp
FALSEevaluated 64 times by 1 test
Evaluated by:
  • cp
)
1-64
1200 {-
1201-
1202-
1203 ok = -
1204 0-
1205 ;-
1206 }
executed 1 time by 1 test: end of block
Executed by:
  • cp
1
1207 else-
1208 {-
1209 -
1210 _Bool -
1211 copy_into_self;-
1212 ok &= copy (arg, dst_name, new_dst, x, &copy_into_self, -
1213 ((void *)0)-
1214 );-
1215-
1216 if (parents_option
parents_optionDescription
TRUEevaluated 12 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 52 times by 1 test
Evaluated by:
  • cp
)
12-52
1217 ok &= re_protect (dst_name, arg_in_concat - dst_name,
executed 12 times by 1 test: ok &= re_protect (dst_name, arg_in_concat - dst_name, attr_list, x);
Executed by:
  • cp
12
1218 attr_list, x);
executed 12 times by 1 test: ok &= re_protect (dst_name, arg_in_concat - dst_name, attr_list, x);
Executed by:
  • cp
12
1219 }
executed 64 times by 1 test: end of block
Executed by:
  • cp
64
1220-
1221 if (parents_option
parents_optionDescription
TRUEevaluated 13 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 52 times by 1 test
Evaluated by:
  • cp
)
13-52
1222 {-
1223 while (attr_list
attr_listDescription
TRUEevaluated 15 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 13 times by 1 test
Evaluated by:
  • cp
)
13-15
1224 {-
1225 struct dir_attr *p = attr_list;-
1226 attr_list = attr_list->next;-
1227 free (p);-
1228 }
executed 15 times by 1 test: end of block
Executed by:
  • cp
15
1229 }
executed 13 times by 1 test: end of block
Executed by:
  • cp
13
1230-
1231 free (dst_name);-
1232 }
executed 65 times by 1 test: end of block
Executed by:
  • cp
65
1233 }
executed 44 times by 1 test: end of block
Executed by:
  • cp
44
1234 else-
1235 {-
1236 char const *new_dest;-
1237 char const *source = file[0];-
1238 char const *dest = file[1];-
1239 -
1240 _Bool -
1241 unused;-
1242-
1243 if (parents_option
parents_optionDescription
TRUEnever evaluated
FALSEevaluated 647 times by 1 test
Evaluated by:
  • cp
)
0-647
1244 {-
1245 error (0, 0,-
1246 -
1247 dcgettext (((void *)0), -
1248 "with --parents, the destination must be a directory"-
1249 , 5)-
1250 );-
1251 usage (-
1252 1-
1253 );-
1254 }
never executed: end of block
0
1255-
1256-
1257-
1258-
1259-
1260-
1261-
1262 if (x->unlink_dest_after_failed_open
x->unlink_dest...er_failed_openDescription
TRUEevaluated 64 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 583 times by 1 test
Evaluated by:
  • cp
64-583
1263 && x->backup_type != no_backups
x->backup_type != no_backupsDescription
TRUEevaluated 24 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 40 times by 1 test
Evaluated by:
  • cp
24-40
1264 && (
( __extension_...)))); }) == 0)Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 18 times by 1 test
Evaluated by:
  • cp
6-18
1265 __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (
( __extension_...)))); }) == 0)Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 18 times by 1 test
Evaluated by:
  • cp
6-18
1266 source
( __extension_...)))); }) == 0)Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 18 times by 1 test
Evaluated by:
  • cp
6-18
1267 ) && __builtin_constant_p (
( __extension_...)))); }) == 0)Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 18 times by 1 test
Evaluated by:
  • cp
6-18
1268 dest
( __extension_...)))); }) == 0)Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 18 times by 1 test
Evaluated by:
  • cp
6-18
1269 ) && (__s1_len = __builtin_strlen (
( __extension_...)))); }) == 0)Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 18 times by 1 test
Evaluated by:
  • cp
6-18
1270 source
( __extension_...)))); }) == 0)Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 18 times by 1 test
Evaluated by:
  • cp
6-18
1271 ), __s2_len = __builtin_strlen (
( __extension_...)))); }) == 0)Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 18 times by 1 test
Evaluated by:
  • cp
6-18
1272 dest
( __extension_...)))); }) == 0)Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 18 times by 1 test
Evaluated by:
  • cp
6-18
1273 ), (!((size_t)(const void *)((
( __extension_...)))); }) == 0)Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 18 times by 1 test
Evaluated by:
  • cp
6-18
1274 source
( __extension_...)))); }) == 0)Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 18 times by 1 test
Evaluated by:
  • cp
6-18
1275 ) + 1) - (size_t)(const void *)(
( __extension_...)))); }) == 0)Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 18 times by 1 test
Evaluated by:
  • cp
6-18
1276 source
( __extension_...)))); }) == 0)Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 18 times by 1 test
Evaluated by:
  • cp
6-18
1277 ) == 1) || __s1_len >= 4) && (!((size_t)(const void *)((
( __extension_...)))); }) == 0)Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 18 times by 1 test
Evaluated by:
  • cp
6-18
1278 dest
( __extension_...)))); }) == 0)Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 18 times by 1 test
Evaluated by:
  • cp
6-18
1279 ) + 1) - (size_t)(const void *)(
( __extension_...)))); }) == 0)Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 18 times by 1 test
Evaluated by:
  • cp
6-18
1280 dest
( __extension_...)))); }) == 0)Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 18 times by 1 test
Evaluated by:
  • cp
6-18
1281 ) == 1) || __s2_len >= 4)) ? __builtin_strcmp (
( __extension_...)))); }) == 0)Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 18 times by 1 test
Evaluated by:
  • cp
6-18
1282 source
( __extension_...)))); }) == 0)Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 18 times by 1 test
Evaluated by:
  • cp
6-18
1283 ,
( __extension_...)))); }) == 0)Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 18 times by 1 test
Evaluated by:
  • cp
6-18
1284 dest
( __extension_...)))); }) == 0)Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 18 times by 1 test
Evaluated by:
  • cp
6-18
1285 ) : (__builtin_constant_p (
( __extension_...)))); }) == 0)Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 18 times by 1 test
Evaluated by:
  • cp
6-18
1286 source
( __extension_...)))); }) == 0)Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 18 times by 1 test
Evaluated by:
  • cp
6-18
1287 ) && ((size_t)(const void *)((
( __extension_...)))); }) == 0)Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 18 times by 1 test
Evaluated by:
  • cp
6-18
1288 source
( __extension_...)))); }) == 0)Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 18 times by 1 test
Evaluated by:
  • cp
6-18
1289 ) + 1) - (size_t)(const void *)(
( __extension_...)))); }) == 0)Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 18 times by 1 test
Evaluated by:
  • cp
6-18
1290 source
( __extension_...)))); }) == 0)Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 18 times by 1 test
Evaluated by:
  • cp
6-18
1291 ) == 1) && (__s1_len = __builtin_strlen (
( __extension_...)))); }) == 0)Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 18 times by 1 test
Evaluated by:
  • cp
6-18
1292 source
( __extension_...)))); }) == 0)Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 18 times by 1 test
Evaluated by:
  • cp
6-18
1293 ), __s1_len < 4) ? (__builtin_constant_p (
( __extension_...)))); }) == 0)Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 18 times by 1 test
Evaluated by:
  • cp
6-18
1294 dest
( __extension_...)))); }) == 0)Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 18 times by 1 test
Evaluated by:
  • cp
6-18
1295 ) && ((size_t)(const void *)((
( __extension_...)))); }) == 0)Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 18 times by 1 test
Evaluated by:
  • cp
6-18
1296 dest
( __extension_...)))); }) == 0)Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 18 times by 1 test
Evaluated by:
  • cp
6-18
1297 ) + 1) - (size_t)(const void *)(
( __extension_...)))); }) == 0)Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 18 times by 1 test
Evaluated by:
  • cp
6-18
1298 dest
( __extension_...)))); }) == 0)Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 18 times by 1 test
Evaluated by:
  • cp
6-18
1299 ) == 1) ? __builtin_strcmp (
( __extension_...)))); }) == 0)Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 18 times by 1 test
Evaluated by:
  • cp
6-18
1300 source
( __extension_...)))); }) == 0)Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 18 times by 1 test
Evaluated by:
  • cp
6-18
1301 ,
( __extension_...)))); }) == 0)Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 18 times by 1 test
Evaluated by:
  • cp
6-18
1302 dest
( __extension_...)))); }) == 0)Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 18 times by 1 test
Evaluated by:
  • cp
6-18
1303 ) : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (
( __extension_...)))); }) == 0)Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 18 times by 1 test
Evaluated by:
  • cp
6-18
1304 dest
( __extension_...)))); }) == 0)Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 18 times by 1 test
Evaluated by:
  • cp
6-18
1305 ); int __result = (((const unsigned char *) (const char *) (
( __extension_...)))); }) == 0)Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 18 times by 1 test
Evaluated by:
  • cp
6-18
1306 source
( __extension_...)))); }) == 0)Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 18 times by 1 test
Evaluated by:
  • cp
6-18
1307 ))[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 6 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 18 times by 1 test
Evaluated by:
  • cp
0-18
1308 source
( __extension_...)))); }) == 0)Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 18 times by 1 test
Evaluated by:
  • cp
6-18
1309 ))[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 6 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 18 times by 1 test
Evaluated by:
  • cp
0-18
1310 source
( __extension_...)))); }) == 0)Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 18 times by 1 test
Evaluated by:
  • cp
6-18
1311 ))[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 *) ( source ))[3] - __s2[3]);
( __extension_...)))); }) == 0)Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 18 times by 1 test
Evaluated by:
  • cp
0-18
1312 source
( __extension_...)))); }) == 0)Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 18 times by 1 test
Evaluated by:
  • cp
never executed: __result = (((const unsigned char *) (const char *) ( source ))[3] - __s2[3]);
0-18
1313 ))[3] - __s2[3]);
( __extension_...)))); }) == 0)Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 18 times by 1 test
Evaluated by:
  • cp
never executed: __result = (((const unsigned char *) (const char *) ( source ))[3] - __s2[3]);
}
never executed: end of block
}
never executed: end of block
__result; }))) : (__builtin_constant_p (
( __extension_...)))); }) == 0)Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 18 times by 1 test
Evaluated by:
  • cp
0-18
1314 dest
( __extension_...)))); }) == 0)Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 18 times by 1 test
Evaluated by:
  • cp
6-18
1315 ) && ((size_t)(const void *)((
( __extension_...)))); }) == 0)Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 18 times by 1 test
Evaluated by:
  • cp
6-18
1316 dest
( __extension_...)))); }) == 0)Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 18 times by 1 test
Evaluated by:
  • cp
6-18
1317 ) + 1) - (size_t)(const void *)(
( __extension_...)))); }) == 0)Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 18 times by 1 test
Evaluated by:
  • cp
6-18
1318 dest
( __extension_...)))); }) == 0)Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 18 times by 1 test
Evaluated by:
  • cp
6-18
1319 ) == 1) && (__s2_len = __builtin_strlen (
( __extension_...)))); }) == 0)Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 18 times by 1 test
Evaluated by:
  • cp
6-18
1320 dest
( __extension_...)))); }) == 0)Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 18 times by 1 test
Evaluated by:
  • cp
6-18
1321 ), __s2_len < 4) ? (__builtin_constant_p (
( __extension_...)))); }) == 0)Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 18 times by 1 test
Evaluated by:
  • cp
6-18
1322 source
( __extension_...)))); }) == 0)Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 18 times by 1 test
Evaluated by:
  • cp
6-18
1323 ) && ((size_t)(const void *)((
( __extension_...)))); }) == 0)Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 18 times by 1 test
Evaluated by:
  • cp
6-18
1324 source
( __extension_...)))); }) == 0)Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 18 times by 1 test
Evaluated by:
  • cp
6-18
1325 ) + 1) - (size_t)(const void *)(
( __extension_...)))); }) == 0)Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 18 times by 1 test
Evaluated by:
  • cp
6-18
1326 source
( __extension_...)))); }) == 0)Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 18 times by 1 test
Evaluated by:
  • cp
6-18
1327 ) == 1) ? __builtin_strcmp (
( __extension_...)))); }) == 0)Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 18 times by 1 test
Evaluated by:
  • cp
6-18
1328 source
( __extension_...)))); }) == 0)Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 18 times by 1 test
Evaluated by:
  • cp
6-18
1329 ,
( __extension_...)))); }) == 0)Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 18 times by 1 test
Evaluated by:
  • cp
6-18
1330 dest
( __extension_...)))); }) == 0)Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 18 times by 1 test
Evaluated by:
  • cp
6-18
1331 ) : -(__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (
( __extension_...)))); }) == 0)Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 18 times by 1 test
Evaluated by:
  • cp
6-18
1332 source
( __extension_...)))); }) == 0)Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 18 times by 1 test
Evaluated by:
  • cp
6-18
1333 ); int __result = (((const unsigned char *) (const char *) (
( __extension_...)))); }) == 0)Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 18 times by 1 test
Evaluated by:
  • cp
6-18
1334 dest
( __extension_...)))); }) == 0)Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 18 times by 1 test
Evaluated by:
  • cp
6-18
1335 ))[0] - __s2[0]); if (__s2_len > 0
__s2_len > 0Description
TRUEnever evaluated
FALSEnever evaluated
&& __result == 0
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
) { __result = (((const unsigned char *) (const char *) (
( __extension_...)))); }) == 0)Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 18 times by 1 test
Evaluated by:
  • cp
0-18
1336 dest
( __extension_...)))); }) == 0)Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 18 times by 1 test
Evaluated by:
  • cp
6-18
1337 ))[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 6 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 18 times by 1 test
Evaluated by:
  • cp
0-18
1338 dest
( __extension_...)))); }) == 0)Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 18 times by 1 test
Evaluated by:
  • cp
6-18
1339 ))[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 *) ( dest ))[3] - __s2[3]);
( __extension_...)))); }) == 0)Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 18 times by 1 test
Evaluated by:
  • cp
0-18
1340 dest
( __extension_...)))); }) == 0)Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 18 times by 1 test
Evaluated by:
  • cp
never executed: __result = (((const unsigned char *) (const char *) ( dest ))[3] - __s2[3]);
0-18
1341 ))[3] - __s2[3]);
( __extension_...)))); }) == 0)Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 18 times by 1 test
Evaluated by:
  • cp
never executed: __result = (((const unsigned char *) (const char *) ( dest ))[3] - __s2[3]);
}
never executed: end of block
}
never executed: end of block
__result; }))) : __builtin_strcmp (
( __extension_...)))); }) == 0)Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 18 times by 1 test
Evaluated by:
  • cp
0-18
1342 source
( __extension_...)))); }) == 0)Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 18 times by 1 test
Evaluated by:
  • cp
6-18
1343 ,
( __extension_...)))); }) == 0)Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 18 times by 1 test
Evaluated by:
  • cp
6-18
1344 dest
( __extension_...)))); }) == 0)Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 18 times by 1 test
Evaluated by:
  • cp
6-18
1345 )))); })
( __extension_...)))); }) == 0)Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 18 times by 1 test
Evaluated by:
  • cp
6-18
1346 == 0)
( __extension_...)))); }) == 0)Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 18 times by 1 test
Evaluated by:
  • cp
6-18
1347 && !new_dst
!new_dstDescription
TRUEevaluated 6 times by 1 test
Evaluated by:
  • cp
FALSEnever evaluated
&&
0-6
1348 ((((
(((( sb.st_mod... == (0100000))Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • cp
FALSEnever evaluated
0-6
1349 sb.st_mode
(((( sb.st_mod... == (0100000))Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • cp
FALSEnever evaluated
0-6
1350 )) & 0170000) == (0100000))
(((( sb.st_mod... == (0100000))Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • cp
FALSEnever evaluated
0-6
1351 )-
1352 {-
1353 static struct cp_options x_tmp;-
1354-
1355 new_dest = find_backup_file_name (dest, x->backup_type);-
1356-
1357-
1358-
1359-
1360-
1361 x_tmp = *x;-
1362 x_tmp.backup_type = no_backups;-
1363 x = &x_tmp;-
1364 }
executed 6 times by 1 test: end of block
Executed by:
  • cp
6
1365 else-
1366 {-
1367 new_dest = dest;-
1368 }
executed 641 times by 1 test: end of block
Executed by:
  • cp
641
1369-
1370 ok = copy (source, new_dest, 0, x, &unused, -
1371 ((void *)0)-
1372 );-
1373 }
executed 647 times by 1 test: end of block
Executed by:
  • cp
647
1374-
1375 return
executed 691 times by 1 test: return ok;
Executed by:
  • cp
ok;
executed 691 times by 1 test: return ok;
Executed by:
  • cp
691
1376}-
1377-
1378static void-
1379cp_option_init (struct cp_options *x)-
1380{-
1381 cp_options_default (x);-
1382 x->copy_as_regular = -
1383 1-
1384 ;-
1385 x->dereference = DEREF_UNDEFINED;-
1386 x->unlink_dest_before_opening = -
1387 0-
1388 ;-
1389 x->unlink_dest_after_failed_open = -
1390 0-
1391 ;-
1392 x->hard_link = -
1393 0-
1394 ;-
1395 x->interactive = I_UNSPECIFIED;-
1396 x->move_mode = -
1397 0-
1398 ;-
1399 x->install_mode = -
1400 0-
1401 ;-
1402 x->one_file_system = -
1403 0-
1404 ;-
1405 x->reflink_mode = REFLINK_NEVER;-
1406-
1407 x->preserve_ownership = -
1408 0-
1409 ;-
1410 x->preserve_links = -
1411 0-
1412 ;-
1413 x->preserve_mode = -
1414 0-
1415 ;-
1416 x->preserve_timestamps = -
1417 0-
1418 ;-
1419 x->explicit_no_preserve_mode = -
1420 0-
1421 ;-
1422 x->preserve_security_context = -
1423 0-
1424 ;-
1425 x->require_preserve_context = -
1426 0-
1427 ;-
1428 x->set_security_context = -
1429 0-
1430 ;-
1431 x->preserve_xattr = -
1432 0-
1433 ;-
1434 x->reduce_diagnostics = -
1435 0-
1436 ;-
1437 x->require_preserve_xattr = -
1438 0-
1439 ;-
1440-
1441 x->data_copy_required = -
1442 1-
1443 ;-
1444 x->require_preserve = -
1445 0-
1446 ;-
1447 x->recursive = -
1448 0-
1449 ;-
1450 x->sparse_mode = SPARSE_AUTO;-
1451 x->symbolic_link = -
1452 0-
1453 ;-
1454 x->set_mode = -
1455 0-
1456 ;-
1457 x->mode = 0;-
1458-
1459-
1460 x->stdin_tty = -
1461 0-
1462 ;-
1463-
1464 x->update = -
1465 0-
1466 ;-
1467 x->verbose = -
1468 0-
1469 ;-
1470-
1471-
1472-
1473-
1474-
1475 x->open_dangling_dest_symlink = getenv ("POSIXLY_CORRECT") != -
1476 ((void *)0)-
1477 ;-
1478-
1479 x->dest_info = -
1480 ((void *)0)-
1481 ;-
1482 x->src_info = -
1483 ((void *)0)-
1484 ;-
1485}
executed 823 times by 1 test: end of block
Executed by:
  • cp
823
1486-
1487-
1488-
1489static void-
1490decode_preserve_arg (char const *arg, struct cp_options *x, -
1491 _Bool -
1492 on_off)-
1493{-
1494 enum File_attribute-
1495 {-
1496 PRESERVE_MODE,-
1497 PRESERVE_TIMESTAMPS,-
1498 PRESERVE_OWNERSHIP,-
1499 PRESERVE_LINK,-
1500 PRESERVE_CONTEXT,-
1501 PRESERVE_XATTR,-
1502 PRESERVE_ALL-
1503 };-
1504 static enum File_attribute const preserve_vals[] =-
1505 {-
1506 PRESERVE_MODE, PRESERVE_TIMESTAMPS,-
1507 PRESERVE_OWNERSHIP, PRESERVE_LINK, PRESERVE_CONTEXT, PRESERVE_XATTR,-
1508 PRESERVE_ALL-
1509 };-
1510-
1511 static char const* const preserve_args[] =-
1512 {-
1513 "mode", "timestamps",-
1514 "ownership", "links", "context", "xattr", "all", -
1515 ((void *)0)-
1516 -
1517 };-
1518 _Static_assert ((sizeof (preserve_args) / sizeof *(preserve_args)) == (sizeof (preserve_vals) / sizeof *(preserve_vals)) + 1, "verify (" "ARRAY_CARDINALITY (preserve_args) == ARRAY_CARDINALITY (preserve_vals) + 1" ")");-
1519-
1520 char *arg_writable = xstrdup (arg);-
1521 char *s = arg_writable;-
1522 do-
1523 {-
1524-
1525 char *comma = -
1526 (__extension__ (__builtin_constant_p (
__builtin_constant_p ( ',' )Description
TRUEevaluated 19 times by 1 test
Evaluated by:
  • cp
FALSEnever evaluated
0-19
1527 ','
__builtin_constant_p ( ',' )Description
TRUEevaluated 19 times by 1 test
Evaluated by:
  • cp
FALSEnever evaluated
0-19
1528 )
__builtin_constant_p ( ',' )Description
TRUEevaluated 19 times by 1 test
Evaluated by:
  • cp
FALSEnever evaluated
&& !__builtin_constant_p (
!__builtin_constant_p ( s )Description
TRUEevaluated 19 times by 1 test
Evaluated by:
  • cp
FALSEnever evaluated
0-19
1529 s
!__builtin_constant_p ( s )Description
TRUEevaluated 19 times by 1 test
Evaluated by:
  • cp
FALSEnever evaluated
0-19
1530 )
!__builtin_constant_p ( s )Description
TRUEevaluated 19 times by 1 test
Evaluated by:
  • cp
FALSEnever evaluated
&& (
( ',' ) == '\0'Description
TRUEnever evaluated
FALSEevaluated 19 times by 1 test
Evaluated by:
  • cp
0-19
1531 ','
( ',' ) == '\0'Description
TRUEnever evaluated
FALSEevaluated 19 times by 1 test
Evaluated by:
  • cp
0-19
1532 ) == '\0'
( ',' ) == '\0'Description
TRUEnever evaluated
FALSEevaluated 19 times by 1 test
Evaluated by:
  • cp
? (char *) __rawmemchr (
0-19
1533 s-
1534 , -
1535 ','-
1536 ) : __builtin_strchr (-
1537 s-
1538 , -
1539 ','-
1540 )))-
1541 ;-
1542 enum File_attribute val;-
1543-
1544-
1545 if (comma
commaDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • cp
FALSEevaluated 18 times by 1 test
Evaluated by:
  • cp
)
1-18
1546 *
executed 1 time by 1 test: *comma++ = 0;
Executed by:
  • cp
comma++ = 0;
executed 1 time by 1 test: *comma++ = 0;
Executed by:
  • cp
1
1547-
1548-
1549 val = ((preserve_vals) [__xargmatch_internal (on_off ? "--preserve" : "--no-preserve", s, preserve_args, (char const *) (preserve_vals), sizeof *(preserve_vals), argmatch_die)])-
1550 ;-
1551 switch (val)-
1552 {-
1553 case
executed 8 times by 1 test: case PRESERVE_MODE:
Executed by:
  • cp
PRESERVE_MODE:
executed 8 times by 1 test: case PRESERVE_MODE:
Executed by:
  • cp
8
1554 x->preserve_mode = on_off;-
1555 x->explicit_no_preserve_mode = !on_off;-
1556 break;
executed 8 times by 1 test: break;
Executed by:
  • cp
8
1557-
1558 case
never executed: case PRESERVE_TIMESTAMPS:
PRESERVE_TIMESTAMPS:
never executed: case PRESERVE_TIMESTAMPS:
0
1559 x->preserve_timestamps = on_off;-
1560 break;
never executed: break;
0
1561-
1562 case
executed 1 time by 1 test: case PRESERVE_OWNERSHIP:
Executed by:
  • cp
PRESERVE_OWNERSHIP:
executed 1 time by 1 test: case PRESERVE_OWNERSHIP:
Executed by:
  • cp
1
1563 x->preserve_ownership = on_off;-
1564 break;
executed 1 time by 1 test: break;
Executed by:
  • cp
1
1565-
1566 case
executed 7 times by 1 test: case PRESERVE_LINK:
Executed by:
  • cp
PRESERVE_LINK:
executed 7 times by 1 test: case PRESERVE_LINK:
Executed by:
  • cp
7
1567 x->preserve_links = on_off;-
1568 break;
executed 7 times by 1 test: break;
Executed by:
  • cp
7
1569-
1570 case
never executed: case PRESERVE_CONTEXT:
PRESERVE_CONTEXT:
never executed: case PRESERVE_CONTEXT:
0
1571 x->require_preserve_context = on_off;-
1572 x->preserve_security_context = on_off;-
1573 break;
never executed: break;
0
1574-
1575 case
executed 1 time by 1 test: case PRESERVE_XATTR:
Executed by:
  • cp
PRESERVE_XATTR:
executed 1 time by 1 test: case PRESERVE_XATTR:
Executed by:
  • cp
1
1576 x->preserve_xattr = on_off;-
1577 x->require_preserve_xattr = on_off;-
1578 break;
executed 1 time by 1 test: break;
Executed by:
  • cp
1
1579-
1580 case
executed 1 time by 1 test: case PRESERVE_ALL:
Executed by:
  • cp
PRESERVE_ALL:
executed 1 time by 1 test: case PRESERVE_ALL:
Executed by:
  • cp
1
1581 x->preserve_mode = on_off;-
1582 x->preserve_timestamps = on_off;-
1583 x->preserve_ownership = on_off;-
1584 x->preserve_links = on_off;-
1585 x->explicit_no_preserve_mode = !on_off;-
1586 if (selinux_enabled
selinux_enabledDescription
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • cp
)
0-1
1587 x->preserve_security_context = on_off;
never executed: x->preserve_security_context = on_off;
0
1588 x->preserve_xattr = on_off;-
1589 break;
executed 1 time by 1 test: break;
Executed by:
  • cp
1
1590-
1591 default
never executed: default:
:
never executed: default:
0
1592 abort ();
never executed: abort ();
0
1593 }-
1594 s = comma;-
1595 }
executed 18 times by 1 test: end of block
Executed by:
  • cp
18
1596 while (s
sDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • cp
FALSEevaluated 17 times by 1 test
Evaluated by:
  • cp
);
1-17
1597-
1598 free (arg_writable);-
1599}
executed 17 times by 1 test: end of block
Executed by:
  • cp
17
1600-
1601int-
1602main (int argc, char **argv)-
1603{-
1604 int c;-
1605 -
1606 _Bool -
1607 ok;-
1608 -
1609 _Bool -
1610 make_backups = -
1611 0-
1612 ;-
1613 char const *backup_suffix = -
1614 ((void *)0)-
1615 ;-
1616 char *version_control_string = -
1617 ((void *)0)-
1618 ;-
1619 struct cp_options x;-
1620 -
1621 _Bool -
1622 copy_contents = -
1623 0-
1624 ;-
1625 char *target_directory = -
1626 ((void *)0)-
1627 ;-
1628 -
1629 _Bool -
1630 no_target_directory = -
1631 0-
1632 ;-
1633 char const *scontext = -
1634 ((void *)0)-
1635 ;-
1636-
1637 ;-
1638 set_program_name (argv[0]);-
1639 setlocale (-
1640 6-
1641 , "");-
1642 bindtextdomain ("coreutils", "/usr/local/share/locale");-
1643 textdomain ("coreutils");-
1644-
1645 atexit (close_stdin);-
1646-
1647 selinux_enabled = (0 < is_selinux_enabled ());-
1648 cp_option_init (&x);-
1649-
1650 while ((
(c = getopt_lo... *)0) )) != -1Description
TRUEevaluated 761 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 696 times by 1 test
Evaluated by:
  • cp
c = getopt_long (argc, argv, "abdfHilLnprst:uvxPRS:TZ",
(c = getopt_lo... *)0) )) != -1Description
TRUEevaluated 761 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 696 times by 1 test
Evaluated by:
  • cp
696-761
1651 long_opts,
(c = getopt_lo... *)0) )) != -1Description
TRUEevaluated 761 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 696 times by 1 test
Evaluated by:
  • cp
696-761
1652 ((void *)0)
(c = getopt_lo... *)0) )) != -1Description
TRUEevaluated 761 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 696 times by 1 test
Evaluated by:
  • cp
696-761
1653 ))
(c = getopt_lo... *)0) )) != -1Description
TRUEevaluated 761 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 696 times by 1 test
Evaluated by:
  • cp
696-761
1654 != -1
(c = getopt_lo... *)0) )) != -1Description
TRUEevaluated 761 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 696 times by 1 test
Evaluated by:
  • cp
)
696-761
1655 {-
1656 switch (c)-
1657 {-
1658 case
executed 87 times by 1 test: case SPARSE_OPTION:
Executed by:
  • cp
SPARSE_OPTION:
executed 87 times by 1 test: case SPARSE_OPTION:
Executed by:
  • cp
87
1659 x.sparse_mode = ((sparse_type) [__xargmatch_internal ("--sparse", optarg, sparse_type_string, (char const *) (sparse_type), sizeof *(sparse_type), argmatch_die)])-
1660 ;-
1661 break;
executed 86 times by 1 test: break;
Executed by:
  • cp
86
1662-
1663 case
executed 9 times by 1 test: case REFLINK_OPTION:
Executed by:
  • cp
REFLINK_OPTION:
executed 9 times by 1 test: case REFLINK_OPTION:
Executed by:
  • cp
9
1664 if (optarg ==
optarg == ((void *)0)Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 5 times by 1 test
Evaluated by:
  • cp
4-5
1665 ((void *)0)
optarg == ((void *)0)Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 5 times by 1 test
Evaluated by:
  • cp
4-5
1666 )-
1667 x.reflink_mode = REFLINK_ALWAYS;
executed 4 times by 1 test: x.reflink_mode = REFLINK_ALWAYS;
Executed by:
  • cp
4
1668 else-
1669 x.reflink_mode = ((reflink_type) [__xargmatch_internal ("--reflink", optarg, reflink_type_string, (char const *) (reflink_type), sizeof *(reflink_type), argmatch_die)])
executed 5 times by 1 test: x.reflink_mode = ((reflink_type) [__xargmatch_internal ("--reflink", optarg, reflink_type_string, (char const *) (reflink_type), sizeof *(reflink_type), argmatch_die)]) ;
Executed by:
  • cp
5
1670 ;
executed 5 times by 1 test: x.reflink_mode = ((reflink_type) [__xargmatch_internal ("--reflink", optarg, reflink_type_string, (char const *) (reflink_type), sizeof *(reflink_type), argmatch_die)]) ;
Executed by:
  • cp
5
1671 break;
executed 9 times by 1 test: break;
Executed by:
  • cp
9
1672-
1673 case
executed 19 times by 1 test: case 'a':
Executed by:
  • cp
'a':
executed 19 times by 1 test: case 'a':
Executed by:
  • cp
19
1674-
1675 x.dereference = DEREF_NEVER;-
1676 x.preserve_links = -
1677 1-
1678 ;-
1679 x.preserve_ownership = -
1680 1-
1681 ;-
1682 x.preserve_mode = -
1683 1-
1684 ;-
1685 x.preserve_timestamps = -
1686 1-
1687 ;-
1688 x.require_preserve = -
1689 1-
1690 ;-
1691 if (selinux_enabled
selinux_enabledDescription
TRUEnever evaluated
FALSEevaluated 19 times by 1 test
Evaluated by:
  • cp
)
0-19
1692 x.preserve_security_context =
never executed: x.preserve_security_context = 1 ;
0
1693 1
never executed: x.preserve_security_context = 1 ;
0
1694 ;
never executed: x.preserve_security_context = 1 ;
0
1695 x.preserve_xattr = -
1696 1-
1697 ;-
1698 x.reduce_diagnostics = -
1699 1-
1700 ;-
1701 x.recursive = -
1702 1-
1703 ;-
1704 break;
executed 19 times by 1 test: break;
Executed by:
  • cp
19
1705-
1706 case
executed 108 times by 1 test: case 'b':
Executed by:
  • cp
'b':
executed 108 times by 1 test: case 'b':
Executed by:
  • cp
108
1707 make_backups = -
1708 1-
1709 ;-
1710 if (optarg
optargDescription
TRUEevaluated 46 times by 1 test
Evaluated by:
  • cp
FALSEevaluated 62 times by 1 test
Evaluated by:
  • cp
)
46-62
1711 version_control_string = optarg;
executed 46 times by 1 test: version_control_string = optarg;
Executed by:
  • cp
46
1712 break;
executed 108 times by 1 test: break;
Executed by:
  • cp
108
1713-
1714 case
executed 4 times by 1 test: case ATTRIBUTES_ONLY_OPTION:
Executed by:
  • cp
ATTRIBUTES_ONLY_OPTION:
executed 4 times by 1 test: case ATTRIBUTES_ONLY_OPTION:
Executed by:
  • cp
4
1715 x.data_copy_required = -
1716 0-
1717 ;-
1718 break;
executed 4 times by 1 test: break;
Executed by:
  • cp
4
1719-
1720 case
executed 5 times by 1 test: case COPY_CONTENTS_OPTION:
Executed by:
  • cp
COPY_CONTENTS_OPTION:
executed 5 times by 1 test: case COPY_CONTENTS_OPTION:
Executed by:
  • cp
5
1721 copy_contents = -
1722 1-
1723 ;-
1724 break;
executed 5 times by 1 test: break;
Executed by:
  • cp
5
1725-
1726 case
executed 64 times by 1 test: case 'd':
Executed by:
  • cp
'd':
executed 64 times by 1 test: case 'd':
Executed by:
  • cp
64
1727 x.preserve_links = -
1728 1-
1729 ;-
1730 x.dereference = DEREF_NEVER;-
1731 break;
executed 64 times by 1 test: break;
Executed by:
  • cp
64
1732-
1733 case
executed 66 times by 1 test: case 'f':
Executed by:
  • cp
'f':
executed 66 times by 1 test: case 'f':