OpenCoverage

unlink.c

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

Generated by Squish Coco 4.1.2