OpenCoverage

sync.c

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/coreutils/src/src/sync.c
Switch to Source codePreprocessed file
LineSourceCount
1-
2enum sync_mode-
3{-
4 MODE_FILE,-
5 MODE_DATA,-
6 MODE_FILE_SYSTEM,-
7 MODE_SYNC-
8};-
9-
10static struct option const long_options[] =-
11{-
12 {"data", -
13 0-
14 , -
15 ((void *)0)-
16 , 'd'},-
17 {"file-system", -
18 0-
19 , -
20 ((void *)0)-
21 , 'f'},-
22 {"help", -
23 0-
24 , -
25 ((void *)0)-
26 , GETOPT_HELP_CHAR},-
27 {"version", -
28 0-
29 , -
30 ((void *)0)-
31 , GETOPT_VERSION_CHAR},-
32 {-
33 ((void *)0)-
34 , 0, -
35 ((void *)0)-
36 , 0}-
37};-
38-
39void-
40usage (int status)-
41{-
42 if (status !=
status != 0Description
TRUEevaluated 3 times by 1 test
Evaluated by:
  • sync
FALSEevaluated 7 times by 1 test
Evaluated by:
  • sync
3-7
43 0
status != 0Description
TRUEevaluated 3 times by 1 test
Evaluated by:
  • sync
FALSEevaluated 7 times by 1 test
Evaluated by:
  • sync
3-7
44 )-
45 do { fprintf (-
46 stderr-
47 , -
48 dcgettext (((void *)0), -
49 "Try '%s --help' for more information.\n"-
50 , 5)-
51 , program_name); }
executed 3 times by 1 test: end of block
Executed by:
  • sync
while (0);
3
52 else-
53 {-
54 printf (-
55 dcgettext (((void *)0), -
56 "Usage: %s [OPTION] [FILE]...\n"-
57 , 5)-
58 , program_name);-
59 fputs_unlocked (-
60 dcgettext (((void *)0), -
61 "Synchronize cached writes to persistent storage\n\nIf one or more files are specified, sync only them,\nor their containing file systems.\n\n"-
62 , 5)-
63 ,-
64 stdout-
65 )-
66-
67-
68-
69-
70-
71 ;-
72-
73 fputs_unlocked (-
74 dcgettext (((void *)0), -
75 " -d, --data sync only file data, no unneeded metadata\n"-
76 , 5)-
77 ,-
78 stdout-
79 )-
80-
81 ;-
82 fputs_unlocked (-
83 dcgettext (((void *)0), -
84 " -f, --file-system sync the file systems that contain the files\n"-
85 , 5)-
86 ,-
87 stdout-
88 )-
89-
90 ;-
91-
92 fputs_unlocked (-
93 dcgettext (((void *)0), -
94 " --help display this help and exit\n"-
95 , 5)-
96 ,-
97 stdout-
98 );-
99 fputs_unlocked (-
100 dcgettext (((void *)0), -
101 " --version output version information and exit\n"-
102 , 5)-
103 ,-
104 stdout-
105 );-
106 emit_ancillary_info ("sync");-
107 }
executed 7 times by 1 test: end of block
Executed by:
  • sync
7
108 exit (status);
executed 10 times by 1 test: exit (status);
Executed by:
  • sync
10
109}-
110-
111-
112-
113-
114static -
115 _Bool-
116-
117sync_arg (enum sync_mode mode, char const *file)-
118{-
119 -
120 _Bool -
121 ret = -
122 1-
123 ;-
124 int open_flags = -
125 00 -
126 | -
127 04000-
128 ;-
129 int fd;-
130 fd = open (file, open_flags);-
131 if (fd < 0
fd < 0Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • sync
FALSEevaluated 4 times by 1 test
Evaluated by:
  • sync
)
2-4
132 {-
133-
134-
135 int rd_errno = -
136 (*__errno_location ())-
137 ;-
138 if (open_flags != (
open_flags != ( 01 | 04000 )Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • sync
FALSEnever evaluated
0-2
139 01
open_flags != ( 01 | 04000 )Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • sync
FALSEnever evaluated
0-2
140 |
open_flags != ( 01 | 04000 )Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • sync
FALSEnever evaluated
0-2
141 04000
open_flags != ( 01 | 04000 )Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • sync
FALSEnever evaluated
0-2
142 )
open_flags != ( 01 | 04000 )Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • sync
FALSEnever evaluated
)
0-2
143 fd = open (file,
executed 2 times by 1 test: fd = open (file, 01 | 04000 );
Executed by:
  • sync
2
144 01
executed 2 times by 1 test: fd = open (file, 01 | 04000 );
Executed by:
  • sync
2
145 |
executed 2 times by 1 test: fd = open (file, 01 | 04000 );
Executed by:
  • sync
2
146 04000
executed 2 times by 1 test: fd = open (file, 01 | 04000 );
Executed by:
  • sync
2
147 );
executed 2 times by 1 test: fd = open (file, 01 | 04000 );
Executed by:
  • sync
2
148 if (fd < 0
fd < 0Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • sync
FALSEnever evaluated
)
0-2
149 error (0, rd_errno,
executed 2 times by 1 test: error (0, rd_errno, dcgettext (((void *)0), "error opening %s" , 5) , quotearg_style (shell_escape_always_quoting_style, file));
Executed by:
  • sync
2
150 dcgettext (((void *)0),
executed 2 times by 1 test: error (0, rd_errno, dcgettext (((void *)0), "error opening %s" , 5) , quotearg_style (shell_escape_always_quoting_style, file));
Executed by:
  • sync
2
151 "error opening %s"
executed 2 times by 1 test: error (0, rd_errno, dcgettext (((void *)0), "error opening %s" , 5) , quotearg_style (shell_escape_always_quoting_style, file));
Executed by:
  • sync
2
152 , 5)
executed 2 times by 1 test: error (0, rd_errno, dcgettext (((void *)0), "error opening %s" , 5) , quotearg_style (shell_escape_always_quoting_style, file));
Executed by:
  • sync
2
153 , quotearg_style (shell_escape_always_quoting_style, file));
executed 2 times by 1 test: error (0, rd_errno, dcgettext (((void *)0), "error opening %s" , 5) , quotearg_style (shell_escape_always_quoting_style, file));
Executed by:
  • sync
2
154 return
executed 2 times by 1 test: return 0 ;
Executed by:
  • sync
executed 2 times by 1 test: return 0 ;
Executed by:
  • sync
2
155 0
executed 2 times by 1 test: return 0 ;
Executed by:
  • sync
2
156 ;
executed 2 times by 1 test: return 0 ;
Executed by:
  • sync
2
157 }-
158-
159-
160-
161 int fdflags = -
162 rpl_fcntl -
163 (fd, -
164 3-
165 );-
166 if (fdflags == -1
fdflags == -1Description
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • sync
0-4
167 || -
168 rpl_fcntl
rpl_fcntl (fd,... ~ 04000 ) < 0Description
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • sync
0-4
169 (fd,
rpl_fcntl (fd,... ~ 04000 ) < 0Description
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • sync
0-4
170 4
rpl_fcntl (fd,... ~ 04000 ) < 0Description
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • sync
0-4
171 , fdflags & ~
rpl_fcntl (fd,... ~ 04000 ) < 0Description
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • sync
0-4
172 04000
rpl_fcntl (fd,... ~ 04000 ) < 0Description
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • sync
0-4
173 ) < 0
rpl_fcntl (fd,... ~ 04000 ) < 0Description
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • sync
)
0-4
174 {-
175 error (0, -
176 (*__errno_location ())-
177 , -
178 dcgettext (((void *)0), -
179 "couldn't reset non-blocking mode %s"-
180 , 5)-
181 ,-
182 quotearg_style (shell_escape_always_quoting_style, file));-
183 ret = -
184 0-
185 ;-
186 }
never executed: end of block
0
187-
188 if (ret ==
ret == 1Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • sync
FALSEnever evaluated
0-4
189 1
ret == 1Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • sync
FALSEnever evaluated
0-4
190 )-
191 {-
192 int sync_status = -1;-
193-
194 switch (mode)-
195 {-
196 case
never executed: case MODE_DATA:
MODE_DATA:
never executed: case MODE_DATA:
0
197 sync_status = fdatasync (fd);-
198 break;
never executed: break;
0
199-
200 case
executed 4 times by 1 test: case MODE_FILE:
Executed by:
  • sync
MODE_FILE:
executed 4 times by 1 test: case MODE_FILE:
Executed by:
  • sync
4
201 sync_status = fsync (fd);-
202 break;
executed 4 times by 1 test: break;
Executed by:
  • sync
4
203-
204-
205 case
never executed: case MODE_FILE_SYSTEM:
MODE_FILE_SYSTEM:
never executed: case MODE_FILE_SYSTEM:
0
206 sync_status = syncfs (fd);-
207 break;
never executed: break;
0
208-
209-
210 default
never executed: default:
:
never executed: default:
0
211 -
212 ((-
213 "invalid sync_mode"-
214 ) ? (void) (0) : __assert_fail (-
215 "\"invalid sync_mode\""-
216 , "src/sync.c", 150, __PRETTY_FUNCTION__))-
217 ;-
218 }
never executed: end of block
0
219-
220 if (sync_status < 0
sync_status < 0Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • sync
FALSEevaluated 3 times by 1 test
Evaluated by:
  • sync
)
1-3
221 {-
222 error (0, -
223 (*__errno_location ())-
224 , -
225 dcgettext (((void *)0), -
226 "error syncing %s"-
227 , 5)-
228 , quotearg_style (shell_escape_always_quoting_style, file));-
229 ret = -
230 0-
231 ;-
232 }
executed 1 time by 1 test: end of block
Executed by:
  • sync
1
233 }
executed 4 times by 1 test: end of block
Executed by:
  • sync
4
234-
235 if (close (fd) < 0
close (fd) < 0Description
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • sync
)
0-4
236 {-
237 error (0, -
238 (*__errno_location ())-
239 , -
240 dcgettext (((void *)0), -
241 "failed to close %s"-
242 , 5)-
243 , quotearg_style (shell_escape_always_quoting_style, file));-
244 ret = -
245 0-
246 ;-
247 }
never executed: end of block
0
248-
249 return
executed 4 times by 1 test: return ret;
Executed by:
  • sync
ret;
executed 4 times by 1 test: return ret;
Executed by:
  • sync
4
250}-
251-
252int-
253main (int argc, char **argv)-
254{-
255 int c;-
256 -
257 _Bool -
258 args_specified;-
259 -
260 _Bool -
261 arg_data = -
262 0-
263 , arg_file_system = -
264 0-
265 ;-
266 enum sync_mode mode;-
267 -
268 _Bool -
269 ok = -
270 1-
271 ;-
272-
273 ;-
274 set_program_name (argv[0]);-
275 setlocale (-
276 6-
277 , "");-
278 bindtextdomain ("coreutils", "/usr/local/share/locale");-
279 textdomain ("coreutils");-
280-
281 atexit (close_stdout);-
282-
283 while ((
(c = getopt_lo... *)0) )) != -1Description
TRUEevaluated 22 times by 1 test
Evaluated by:
  • sync
FALSEevaluated 7 times by 1 test
Evaluated by:
  • sync
c = getopt_long (argc, argv, "df", long_options,
(c = getopt_lo... *)0) )) != -1Description
TRUEevaluated 22 times by 1 test
Evaluated by:
  • sync
FALSEevaluated 7 times by 1 test
Evaluated by:
  • sync
7-22
284 ((void *)0)
(c = getopt_lo... *)0) )) != -1Description
TRUEevaluated 22 times by 1 test
Evaluated by:
  • sync
FALSEevaluated 7 times by 1 test
Evaluated by:
  • sync
7-22
285 ))
(c = getopt_lo... *)0) )) != -1Description
TRUEevaluated 22 times by 1 test
Evaluated by:
  • sync
FALSEevaluated 7 times by 1 test
Evaluated by:
  • sync
7-22
286 != -1
(c = getopt_lo... *)0) )) != -1Description
TRUEevaluated 22 times by 1 test
Evaluated by:
  • sync
FALSEevaluated 7 times by 1 test
Evaluated by:
  • sync
)
7-22
287 {-
288 switch (c)-
289 {-
290 case
executed 4 times by 1 test: case 'd':
Executed by:
  • sync
'd':
executed 4 times by 1 test: case 'd':
Executed by:
  • sync
4
291 arg_data = -
292 1-
293 ;-
294 break;
executed 4 times by 1 test: break;
Executed by:
  • sync
4
295-
296 case
executed 3 times by 1 test: case 'f':
Executed by:
  • sync
'f':
executed 3 times by 1 test: case 'f':
Executed by:
  • sync
3
297 arg_file_system = -
298 1-
299 ;-
300 break;
executed 3 times by 1 test: break;
Executed by:
  • sync
3
301-
302 case
executed 7 times by 1 test: case GETOPT_HELP_CHAR:
Executed by:
  • sync
GETOPT_HELP_CHAR:
executed 7 times by 1 test: case GETOPT_HELP_CHAR:
Executed by:
  • sync
usage (
7
303 0-
304 ); break;
never executed: break;
;
0
305-
306 case
executed 5 times by 1 test: case GETOPT_VERSION_CHAR:
Executed by:
  • sync
GETOPT_VERSION_CHAR:
executed 5 times by 1 test: case GETOPT_VERSION_CHAR:
Executed by:
  • sync
version_etc (
5
307 stdout-
308 , "sync", "GNU coreutils", Version, ("Jim Meyering"), ("Giuseppe Scrivano"), (char *) -
309 ((void *)0)-
310 ); exit (
executed 5 times by 1 test: exit ( 0 );
Executed by:
  • sync
5
311 0
executed 5 times by 1 test: exit ( 0 );
Executed by:
  • sync
5
312 );
executed 5 times by 1 test: exit ( 0 );
Executed by:
  • sync
break;
never executed: break;
;
0-5
313-
314 default
executed 3 times by 1 test: default:
Executed by:
  • sync
:
executed 3 times by 1 test: default:
Executed by:
  • sync
3
315 usage (-
316 1-
317 );-
318 }
never executed: end of block
0
319 }-
320-
321 args_specified = optind < argc;-
322-
323 if (arg_data
arg_dataDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • sync
FALSEevaluated 5 times by 1 test
Evaluated by:
  • sync
&& arg_file_system
arg_file_systemDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • sync
FALSEevaluated 1 time by 1 test
Evaluated by:
  • sync
)
1-5
324 {-
325 ((!!sizeof (struct { _Static_assert (-
326 1-
327 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"cannot specify both --data and --file-system\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error (-
328 1-
329 , 0, -
330 dcgettext (((void *)0), -
331 "cannot specify both --data and --file-system"-
332 , 5)-
333 ), ((-
334 0-
335 ) ? (void) 0 : __builtin_unreachable ()))) : ((error (-
336 1-
337 , 0, -
338 dcgettext (((void *)0), -
339 "cannot specify both --data and --file-system"-
340 , 5)-
341 ), ((-
342 0-
343 ) ? (void) 0 : __builtin_unreachable ()))))-
344 ;-
345 }
never executed: end of block
0
346-
347 if (!args_specified
!args_specifiedDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • sync
FALSEevaluated 5 times by 1 test
Evaluated by:
  • sync
&& arg_data
arg_dataDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • sync
FALSEnever evaluated
)
0-5
348 ((
executed 1 time by 1 test: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"--data needs at least one argument\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "--data needs at least one argument" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "--data needs at least one argument" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
Executed by:
  • sync
!!sizeof (struct { _Static_assert (
executed 1 time by 1 test: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"--data needs at least one argument\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "--data needs at least one argument" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "--data needs at least one argument" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
Executed by:
  • sync
1
349 1
executed 1 time by 1 test: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"--data needs at least one argument\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "--data needs at least one argument" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "--data needs at least one argument" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
Executed by:
  • sync
1
350 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"--data needs at least one argument\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error (
executed 1 time by 1 test: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"--data needs at least one argument\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "--data needs at least one argument" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "--data needs at least one argument" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
Executed by:
  • sync
1
351 1
executed 1 time by 1 test: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"--data needs at least one argument\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "--data needs at least one argument" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "--data needs at least one argument" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
Executed by:
  • sync
1
352 , 0,
executed 1 time by 1 test: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"--data needs at least one argument\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "--data needs at least one argument" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "--data needs at least one argument" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
Executed by:
  • sync
1
353 dcgettext (((void *)0),
executed 1 time by 1 test: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"--data needs at least one argument\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "--data needs at least one argument" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "--data needs at least one argument" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
Executed by:
  • sync
1
354 "--data needs at least one argument"
executed 1 time by 1 test: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"--data needs at least one argument\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "--data needs at least one argument" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "--data needs at least one argument" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
Executed by:
  • sync
1
355 , 5)
executed 1 time by 1 test: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"--data needs at least one argument\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "--data needs at least one argument" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "--data needs at least one argument" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
Executed by:
  • sync
1
356 ), ((
executed 1 time by 1 test: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"--data needs at least one argument\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "--data needs at least one argument" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "--data needs at least one argument" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
Executed by:
  • sync
1
357 0
executed 1 time by 1 test: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"--data needs at least one argument\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "--data needs at least one argument" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "--data needs at least one argument" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
Executed by:
  • sync
1
358 ) ? (void) 0 : __builtin_unreachable ()))) : ((error (
executed 1 time by 1 test: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"--data needs at least one argument\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "--data needs at least one argument" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "--data needs at least one argument" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
Executed by:
  • sync
1
359 1
executed 1 time by 1 test: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"--data needs at least one argument\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "--data needs at least one argument" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "--data needs at least one argument" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
Executed by:
  • sync
1
360 , 0,
executed 1 time by 1 test: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"--data needs at least one argument\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "--data needs at least one argument" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "--data needs at least one argument" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
Executed by:
  • sync
1
361 dcgettext (((void *)0),
executed 1 time by 1 test: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"--data needs at least one argument\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "--data needs at least one argument" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "--data needs at least one argument" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
Executed by:
  • sync
1
362 "--data needs at least one argument"
executed 1 time by 1 test: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"--data needs at least one argument\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "--data needs at least one argument" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "--data needs at least one argument" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
Executed by:
  • sync
1
363 , 5)
executed 1 time by 1 test: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"--data needs at least one argument\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "--data needs at least one argument" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "--data needs at least one argument" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
Executed by:
  • sync
1
364 ), ((
executed 1 time by 1 test: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"--data needs at least one argument\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "--data needs at least one argument" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "--data needs at least one argument" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
Executed by:
  • sync
1
365 0
executed 1 time by 1 test: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"--data needs at least one argument\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "--data needs at least one argument" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "--data needs at least one argument" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
Executed by:
  • sync
1
366 ) ? (void) 0 : __builtin_unreachable ()))));
executed 1 time by 1 test: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"--data needs at least one argument\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "--data needs at least one argument" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "--data needs at least one argument" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
Executed by:
  • sync
1
367-
368 if (! args_specified
! args_specifiedDescription
TRUEnever evaluated
FALSEevaluated 5 times by 1 test
Evaluated by:
  • sync
|| (arg_file_system && ! 1))
0-5
369 mode = MODE_SYNC;
never executed: mode = MODE_SYNC;
0
370 else if (arg_file_system
arg_file_systemDescription
TRUEnever evaluated
FALSEevaluated 5 times by 1 test
Evaluated by:
  • sync
)
0-5
371 mode = MODE_FILE_SYSTEM;
never executed: mode = MODE_FILE_SYSTEM;
0
372 else if (! arg_data
! arg_dataDescription
TRUEevaluated 5 times by 1 test
Evaluated by:
  • sync
FALSEnever evaluated
)
0-5
373 mode = MODE_FILE;
executed 5 times by 1 test: mode = MODE_FILE;
Executed by:
  • sync
5
374 else-
375 mode = MODE_DATA;
never executed: mode = MODE_DATA;
0
376-
377 if (mode == MODE_SYNC
mode == MODE_SYNCDescription
TRUEnever evaluated
FALSEevaluated 5 times by 1 test
Evaluated by:
  • sync
)
0-5
378 sync ();
never executed: sync ();
0
379 else-
380 {-
381 for (; optind < argc
optind < argcDescription
TRUEevaluated 6 times by 1 test
Evaluated by:
  • sync
FALSEevaluated 5 times by 1 test
Evaluated by:
  • sync
; optind++)
5-6
382 ok &= sync_arg (mode, argv[optind]);
executed 6 times by 1 test: ok &= sync_arg (mode, argv[optind]);
Executed by:
  • sync
6
383 }
executed 5 times by 1 test: end of block
Executed by:
  • sync
5
384-
385 return
executed 5 times by 1 test: return ok ? 0 : 1 ;
Executed by:
  • sync
ok ?
executed 5 times by 1 test: return ok ? 0 : 1 ;
Executed by:
  • sync
5
386 0
executed 5 times by 1 test: return ok ? 0 : 1 ;
Executed by:
  • sync
5
387 :
executed 5 times by 1 test: return ok ? 0 : 1 ;
Executed by:
  • sync
5
388 1
executed 5 times by 1 test: return ok ? 0 : 1 ;
Executed by:
  • sync
5
389 ;
executed 5 times by 1 test: return ok ? 0 : 1 ;
Executed by:
  • sync
5
390}-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.1.2