OpenCoverage

truncate.c

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/coreutils/src/src/truncate.c
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5-
6-
7-
8-
9-
10static -
11 _Bool -
12 no_create;-
13-
14-
15static -
16 _Bool -
17 block_mode;-
18-
19-
20static char const *ref_file;-
21-
22static struct option const longopts[] =-
23{-
24 {"no-create", -
25 0-
26 , -
27 ((void *)0)-
28 , 'c'},-
29 {"io-blocks", -
30 0-
31 , -
32 ((void *)0)-
33 , 'o'},-
34 {"reference", -
35 1-
36 , -
37 ((void *)0)-
38 , 'r'},-
39 {"size", -
40 1-
41 , -
42 ((void *)0)-
43 , 's'},-
44 {"help", -
45 0-
46 , -
47 ((void *)0)-
48 , GETOPT_HELP_CHAR},-
49 {"version", -
50 0-
51 , -
52 ((void *)0)-
53 , GETOPT_VERSION_CHAR},-
54 {-
55 ((void *)0)-
56 , 0, -
57 ((void *)0)-
58 , 0}-
59};-
60-
61typedef enum-
62{ rm_abs = 0, rm_rel, rm_min, rm_max, rm_rdn, rm_rup } rel_mode_t;-
63-
64void-
65usage (int status)-
66{-
67 if (status !=
status != 0Description
TRUEevaluated 9 times by 1 test
Evaluated by:
  • truncate
FALSEevaluated 9 times by 1 test
Evaluated by:
  • truncate
9
68 0
status != 0Description
TRUEevaluated 9 times by 1 test
Evaluated by:
  • truncate
FALSEevaluated 9 times by 1 test
Evaluated by:
  • truncate
9
69 )-
70 do { fprintf (-
71 stderr-
72 , -
73 dcgettext (((void *)0), -
74 "Try '%s --help' for more information.\n"-
75 , 5)-
76 , program_name); }
executed 9 times by 1 test: end of block
Executed by:
  • truncate
while (0);
9
77 else-
78 {-
79 printf (-
80 dcgettext (((void *)0), -
81 "Usage: %s OPTION... FILE...\n"-
82 , 5)-
83 , program_name);-
84 fputs_unlocked (-
85 dcgettext (((void *)0), -
86 "Shrink or extend the size of each FILE to the specified size\n\nA FILE argument that does not exist is created.\n\nIf a FILE is larger than the specified size, the extra data is lost.\nIf a FILE is shorter, it is extended and the extended part (hole)\nreads as zero bytes.\n"-
87 , 5)-
88 ,-
89 stdout-
90 )-
91-
92-
93-
94-
95-
96-
97-
98 ;-
99-
100 emit_mandatory_arg_note ();-
101-
102 fputs_unlocked (-
103 dcgettext (((void *)0), -
104 " -c, --no-create do not create any files\n"-
105 , 5)-
106 ,-
107 stdout-
108 )-
109-
110 ;-
111 fputs_unlocked (-
112 dcgettext (((void *)0), -
113 " -o, --io-blocks treat SIZE as number of IO blocks instead of bytes\n"-
114 , 5)-
115 ,-
116 stdout-
117 )-
118-
119 ;-
120 fputs_unlocked (-
121 dcgettext (((void *)0), -
122 " -r, --reference=RFILE base size on RFILE\n -s, --size=SIZE set or adjust the file size by SIZE bytes\n"-
123 , 5)-
124 ,-
125 stdout-
126 )-
127-
128 ;-
129 fputs_unlocked (-
130 dcgettext (((void *)0), -
131 " --help display this help and exit\n"-
132 , 5)-
133 ,-
134 stdout-
135 );-
136 fputs_unlocked (-
137 dcgettext (((void *)0), -
138 " --version output version information and exit\n"-
139 , 5)-
140 ,-
141 stdout-
142 );-
143 emit_size_note ();-
144 fputs_unlocked (-
145 dcgettext (((void *)0), -
146 "\nSIZE may also be prefixed by one of the following modifying characters:\n'+' extend by, '-' reduce by, '<' at most, '>' at least,\n'/' round down to multiple of, '%' round up to multiple of.\n"-
147 , 5)-
148 ,-
149 stdout-
150 )-
151-
152-
153 ;-
154 emit_ancillary_info ("truncate");-
155 }
executed 9 times by 1 test: end of block
Executed by:
  • truncate
9
156 exit (status);
executed 18 times by 1 test: exit (status);
Executed by:
  • truncate
18
157}-
158-
159-
160static -
161 _Bool-
162-
163do_ftruncate (int fd, char const *fname, off_t ssize, off_t rsize,-
164 rel_mode_t rel_mode)-
165{-
166 struct stat sb;-
167 off_t nsize;-
168-
169 if ((block_mode
block_modeDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • truncate
FALSEevaluated 37 times by 1 test
Evaluated by:
  • truncate
|| (rel_mode
rel_modeDescription
TRUEevaluated 6 times by 1 test
Evaluated by:
  • truncate
FALSEevaluated 31 times by 1 test
Evaluated by:
  • truncate
&& rsize < 0
rsize < 0Description
TRUEevaluated 5 times by 1 test
Evaluated by:
  • truncate
FALSEevaluated 1 time by 1 test
Evaluated by:
  • truncate
)) && fstat (fd, &sb) != 0
fstat (fd, &sb) != 0Description
TRUEnever evaluated
FALSEevaluated 6 times by 1 test
Evaluated by:
  • truncate
)
0-37
170 {-
171 error (0, -
172 (*__errno_location ())-
173 , -
174 dcgettext (((void *)0), -
175 "cannot fstat %s"-
176 , 5)-
177 , quotearg_style (shell_escape_always_quoting_style, fname));-
178 return
never executed: return 0 ;
never executed: return 0 ;
0
179 0
never executed: return 0 ;
0
180 ;
never executed: return 0 ;
0
181 }-
182 if (block_mode
block_modeDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • truncate
FALSEevaluated 37 times by 1 test
Evaluated by:
  • truncate
)
1-37
183 {-
184 off_t const blksize = ((0 < (sb).st_blksize
0 < (sb).st_blksizeDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • truncate
FALSEnever evaluated
&& (
(sb).st_blksiz..._t)-1) / 8 + 1Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • truncate
FALSEnever evaluated
sb).st_blksize <= ((size_t)-1) / 8 + 1
(sb).st_blksiz..._t)-1) / 8 + 1Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • truncate
FALSEnever evaluated
) ? (sb).st_blksize :
0-1
185 512-
186 );-
187 if (ssize < ((off_t) ~ ((off_t) (! (! ((off_t) 0 < (off_t) -1)) ? (off_t) -1 : ((((off_t) 1 << ((sizeof (off_t) * 8) - 2)) - 1) * 2 + 1)))) / blksize
ssize < ((off_...)))) / blksizeDescription
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • truncate
|| ssize > ((off_t) (! (! ((off_t) 0 < (off_t) -1)) ? (off_t) -1 : ((((off_t) 1 << ((sizeof (off_t) * 8) - 2)) - 1) * 2 + 1))) / blksize
ssize > ((off_...1))) / blksizeDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • truncate
FALSEnever evaluated
)
0-1
188 {-
189 error (0, 0,-
190 -
191 dcgettext (((void *)0), -
192 "overflow in %" -
193 "l" "d" -
194 " * %" -
195 "l" "d" -
196 " byte blocks for file %s"-
197 , 5)-
198 -
199 ,-
200 (intmax_t) ssize, (intmax_t) blksize,-
201 quotearg_style (shell_escape_always_quoting_style, fname));-
202 return
executed 1 time by 1 test: return 0 ;
Executed by:
  • truncate
executed 1 time by 1 test: return 0 ;
Executed by:
  • truncate
1
203 0
executed 1 time by 1 test: return 0 ;
Executed by:
  • truncate
1
204 ;
executed 1 time by 1 test: return 0 ;
Executed by:
  • truncate
1
205 }-
206 ssize *= blksize;-
207 }
never executed: end of block
0
208 if (rel_mode
rel_modeDescription
TRUEevaluated 6 times by 1 test
Evaluated by:
  • truncate
FALSEevaluated 31 times by 1 test
Evaluated by:
  • truncate
)
6-31
209 {-
210 uintmax_t fsize;-
211-
212 if (0 <= rsize
0 <= rsizeDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • truncate
FALSEevaluated 5 times by 1 test
Evaluated by:
  • truncate
)
1-5
213 fsize = rsize;
executed 1 time by 1 test: fsize = rsize;
Executed by:
  • truncate
1
214 else-
215 {-
216 off_t file_size;-
217 if (usable_st_size (&sb)
usable_st_size (&sb)Description
TRUEevaluated 5 times by 1 test
Evaluated by:
  • truncate
FALSEnever evaluated
)
0-5
218 {-
219 file_size = sb.st_size;-
220 if (file_size < 0
file_size < 0Description
TRUEnever evaluated
FALSEevaluated 5 times by 1 test
Evaluated by:
  • truncate
)
0-5
221 {-
222-
223-
224 error (0, 0, -
225 dcgettext (((void *)0), -
226 "%s has unusable, apparently negative size"-
227 , 5)-
228 ,-
229 quotearg_style (shell_escape_always_quoting_style, fname));-
230 return
never executed: return 0 ;
never executed: return 0 ;
0
231 0
never executed: return 0 ;
0
232 ;
never executed: return 0 ;
0
233 }-
234 }
executed 5 times by 1 test: end of block
Executed by:
  • truncate
5
235 else-
236 {-
237 file_size = lseek (fd, 0, -
238 2-
239 );-
240 if (file_size < 0
file_size < 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
241 {-
242 error (0, -
243 (*__errno_location ())-
244 , -
245 dcgettext (((void *)0), -
246 "cannot get the size of %s"-
247 , 5)-
248 ,-
249 quotearg_style (shell_escape_always_quoting_style, fname));-
250 return
never executed: return 0 ;
never executed: return 0 ;
0
251 0
never executed: return 0 ;
0
252 ;
never executed: return 0 ;
0
253 }-
254 }
never executed: end of block
0
255 fsize = file_size;-
256 }
executed 5 times by 1 test: end of block
Executed by:
  • truncate
5
257-
258 if (rel_mode == rm_min
rel_mode == rm_minDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • truncate
FALSEevaluated 5 times by 1 test
Evaluated by:
  • truncate
)
1-5
259 nsize =
executed 1 time by 1 test: nsize = ((( fsize )>( (uintmax_t) ssize ))?( fsize ):( (uintmax_t) ssize )) ;
Executed by:
  • truncate
1
260 (((
(( fsize )>( (...ax_t) ssize ))Description
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • truncate
executed 1 time by 1 test: nsize = ((( fsize )>( (uintmax_t) ssize ))?( fsize ):( (uintmax_t) ssize )) ;
Executed by:
  • truncate
0-1
261 fsize
(( fsize )>( (...ax_t) ssize ))Description
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • truncate
executed 1 time by 1 test: nsize = ((( fsize )>( (uintmax_t) ssize ))?( fsize ):( (uintmax_t) ssize )) ;
Executed by:
  • truncate
0-1
262 )>(
(( fsize )>( (...ax_t) ssize ))Description
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • truncate
executed 1 time by 1 test: nsize = ((( fsize )>( (uintmax_t) ssize ))?( fsize ):( (uintmax_t) ssize )) ;
Executed by:
  • truncate
0-1
263 (uintmax_t) ssize
(( fsize )>( (...ax_t) ssize ))Description
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • truncate
executed 1 time by 1 test: nsize = ((( fsize )>( (uintmax_t) ssize ))?( fsize ):( (uintmax_t) ssize )) ;
Executed by:
  • truncate
0-1
264 ))
(( fsize )>( (...ax_t) ssize ))Description
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • truncate
?(
executed 1 time by 1 test: nsize = ((( fsize )>( (uintmax_t) ssize ))?( fsize ):( (uintmax_t) ssize )) ;
Executed by:
  • truncate
0-1
265 fsize
executed 1 time by 1 test: nsize = ((( fsize )>( (uintmax_t) ssize ))?( fsize ):( (uintmax_t) ssize )) ;
Executed by:
  • truncate
1
266 ):(
executed 1 time by 1 test: nsize = ((( fsize )>( (uintmax_t) ssize ))?( fsize ):( (uintmax_t) ssize )) ;
Executed by:
  • truncate
1
267 (uintmax_t) ssize
executed 1 time by 1 test: nsize = ((( fsize )>( (uintmax_t) ssize ))?( fsize ):( (uintmax_t) ssize )) ;
Executed by:
  • truncate
1
268 ))
executed 1 time by 1 test: nsize = ((( fsize )>( (uintmax_t) ssize ))?( fsize ):( (uintmax_t) ssize )) ;
Executed by:
  • truncate
1
269 ;
executed 1 time by 1 test: nsize = ((( fsize )>( (uintmax_t) ssize ))?( fsize ):( (uintmax_t) ssize )) ;
Executed by:
  • truncate
1
270 else if (rel_mode == rm_max
rel_mode == rm_maxDescription
TRUEnever evaluated
FALSEevaluated 5 times by 1 test
Evaluated by:
  • truncate
)
0-5
271 nsize =
never executed: nsize = ((( fsize )<( (uintmax_t) ssize ))?( fsize ):( (uintmax_t) ssize )) ;
0
272 (((
(( fsize )<( (...ax_t) ssize ))Description
TRUEnever evaluated
FALSEnever evaluated
never executed: nsize = ((( fsize )<( (uintmax_t) ssize ))?( fsize ):( (uintmax_t) ssize )) ;
0
273 fsize
(( fsize )<( (...ax_t) ssize ))Description
TRUEnever evaluated
FALSEnever evaluated
never executed: nsize = ((( fsize )<( (uintmax_t) ssize ))?( fsize ):( (uintmax_t) ssize )) ;
0
274 )<(
(( fsize )<( (...ax_t) ssize ))Description
TRUEnever evaluated
FALSEnever evaluated
never executed: nsize = ((( fsize )<( (uintmax_t) ssize ))?( fsize ):( (uintmax_t) ssize )) ;
0
275 (uintmax_t) ssize
(( fsize )<( (...ax_t) ssize ))Description
TRUEnever evaluated
FALSEnever evaluated
never executed: nsize = ((( fsize )<( (uintmax_t) ssize ))?( fsize ):( (uintmax_t) ssize )) ;
0
276 ))
(( fsize )<( (...ax_t) ssize ))Description
TRUEnever evaluated
FALSEnever evaluated
?(
never executed: nsize = ((( fsize )<( (uintmax_t) ssize ))?( fsize ):( (uintmax_t) ssize )) ;
0
277 fsize
never executed: nsize = ((( fsize )<( (uintmax_t) ssize ))?( fsize ):( (uintmax_t) ssize )) ;
0
278 ):(
never executed: nsize = ((( fsize )<( (uintmax_t) ssize ))?( fsize ):( (uintmax_t) ssize )) ;
0
279 (uintmax_t) ssize
never executed: nsize = ((( fsize )<( (uintmax_t) ssize ))?( fsize ):( (uintmax_t) ssize )) ;
0
280 ))
never executed: nsize = ((( fsize )<( (uintmax_t) ssize ))?( fsize ):( (uintmax_t) ssize )) ;
0
281 ;
never executed: nsize = ((( fsize )<( (uintmax_t) ssize ))?( fsize ):( (uintmax_t) ssize )) ;
0
282 else if (rel_mode == rm_rdn
rel_mode == rm_rdnDescription
TRUEnever evaluated
FALSEevaluated 5 times by 1 test
Evaluated by:
  • truncate
)
0-5
283-
284 nsize = (fsize / ssize) * ssize;
never executed: nsize = (fsize / ssize) * ssize;
0
285 else if (rel_mode == rm_rup
rel_mode == rm_rupDescription
TRUEnever evaluated
FALSEevaluated 5 times by 1 test
Evaluated by:
  • truncate
)
0-5
286-
287 {-
288-
289 uintmax_t const overflow = ((fsize + ssize - 1) / ssize) * ssize;-
290 if (overflow > ((off_t) (! (! ((off_t) 0 < (off_t) -1)) ? (off_t) -1 : ((((off_t) 1 << ((sizeof (off_t) * 8) - 2)) - 1) * 2 + 1)))
overflow > ((o... 1) * 2 + 1)))Description
TRUEnever evaluated
FALSEnever evaluated
)
0
291 {-
292 error (0, 0, -
293 dcgettext (((void *)0), -
294 "overflow rounding up size of file %s"-
295 , 5)-
296 ,-
297 quotearg_style (shell_escape_always_quoting_style, fname));-
298 return
never executed: return 0 ;
never executed: return 0 ;
0
299 0
never executed: return 0 ;
0
300 ;
never executed: return 0 ;
0
301 }-
302 nsize = overflow;-
303 }
never executed: end of block
0
304 else-
305 {-
306 if (ssize > ((off_t) (! (! ((off_t) 0 < (off_t) -1)) ? (off_t) -1 : ((((off_t) 1 << ((sizeof (off_t) * 8) - 2)) - 1) * 2 + 1))) - (off_t)fsize
ssize > ((off_...- (off_t)fsizeDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • truncate
FALSEevaluated 4 times by 1 test
Evaluated by:
  • truncate
)
1-4
307 {-
308 error (0, 0, -
309 dcgettext (((void *)0), -
310 "overflow extending size of file %s"-
311 , 5)-
312 ,-
313 quotearg_style (shell_escape_always_quoting_style, fname));-
314 return
executed 1 time by 1 test: return 0 ;
Executed by:
  • truncate
executed 1 time by 1 test: return 0 ;
Executed by:
  • truncate
1
315 0
executed 1 time by 1 test: return 0 ;
Executed by:
  • truncate
1
316 ;
executed 1 time by 1 test: return 0 ;
Executed by:
  • truncate
1
317 }-
318 nsize = fsize + ssize;-
319 }
executed 4 times by 1 test: end of block
Executed by:
  • truncate
4
320 }-
321 else-
322 nsize = ssize;
executed 31 times by 1 test: nsize = ssize;
Executed by:
  • truncate
31
323 if (nsize < 0
nsize < 0Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • truncate
FALSEevaluated 35 times by 1 test
Evaluated by:
  • truncate
)
1-35
324 nsize = 0;
executed 1 time by 1 test: nsize = 0;
Executed by:
  • truncate
1
325-
326 if (ftruncate (fd, nsize) == -1
ftruncate (fd, nsize) == -1Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • truncate
FALSEevaluated 35 times by 1 test
Evaluated by:
  • truncate
)
1-35
327 {-
328 error (0, -
329 (*__errno_location ())-
330 ,-
331 -
332 dcgettext (((void *)0), -
333 "failed to truncate %s at %" -
334 "l" "d" -
335 " bytes"-
336 , 5)-
337 , quotearg_style (shell_escape_always_quoting_style, fname),-
338 (intmax_t) nsize);-
339 return
executed 1 time by 1 test: return 0 ;
Executed by:
  • truncate
executed 1 time by 1 test: return 0 ;
Executed by:
  • truncate
1
340 0
executed 1 time by 1 test: return 0 ;
Executed by:
  • truncate
1
341 ;
executed 1 time by 1 test: return 0 ;
Executed by:
  • truncate
1
342 }-
343-
344 return
executed 35 times by 1 test: return 1 ;
Executed by:
  • truncate
executed 35 times by 1 test: return 1 ;
Executed by:
  • truncate
35
345 1
executed 35 times by 1 test: return 1 ;
Executed by:
  • truncate
35
346 ;
executed 35 times by 1 test: return 1 ;
Executed by:
  • truncate
35
347}-
348-
349int-
350main (int argc, char **argv)-
351{-
352 -
353 _Bool -
354 got_size = -
355 0-
356 ;-
357 -
358 _Bool -
359 errors = -
360 0-
361 ;-
362 off_t size ;-
363 off_t rsize = -1;-
364 rel_mode_t rel_mode = rm_abs;-
365 int c, fd = -1, oflags;-
366 char const *fname;-
367-
368 ;-
369 set_program_name (argv[0]);-
370 setlocale (-
371 6-
372 , "");-
373 bindtextdomain ("coreutils", "/usr/local/share/locale");-
374 textdomain ("coreutils");-
375-
376 atexit (close_stdout);-
377-
378 while ((
(c = getopt_lo... *)0) )) != -1Description
TRUEevaluated 92 times by 1 test
Evaluated by:
  • truncate
FALSEevaluated 48 times by 1 test
Evaluated by:
  • truncate
c = getopt_long (argc, argv, "cor:s:", longopts,
(c = getopt_lo... *)0) )) != -1Description
TRUEevaluated 92 times by 1 test
Evaluated by:
  • truncate
FALSEevaluated 48 times by 1 test
Evaluated by:
  • truncate
48-92
379 ((void *)0)
(c = getopt_lo... *)0) )) != -1Description
TRUEevaluated 92 times by 1 test
Evaluated by:
  • truncate
FALSEevaluated 48 times by 1 test
Evaluated by:
  • truncate
48-92
380 )) != -1
(c = getopt_lo... *)0) )) != -1Description
TRUEevaluated 92 times by 1 test
Evaluated by:
  • truncate
FALSEevaluated 48 times by 1 test
Evaluated by:
  • truncate
)
48-92
381 {-
382 switch (c)-
383 {-
384 case
executed 3 times by 1 test: case 'c':
Executed by:
  • truncate
'c':
executed 3 times by 1 test: case 'c':
Executed by:
  • truncate
3
385 no_create = -
386 1-
387 ;-
388 break;
executed 3 times by 1 test: break;
Executed by:
  • truncate
3
389-
390 case
executed 4 times by 1 test: case 'o':
Executed by:
  • truncate
'o':
executed 4 times by 1 test: case 'o':
Executed by:
  • truncate
4
391 block_mode = -
392 1-
393 ;-
394 break;
executed 4 times by 1 test: break;
Executed by:
  • truncate
4
395-
396 case
executed 8 times by 1 test: case 'r':
Executed by:
  • truncate
'r':
executed 8 times by 1 test: case 'r':
Executed by:
  • truncate
8
397 ref_file = optarg;-
398 break;
executed 8 times by 1 test: break;
Executed by:
  • truncate
8
399-
400 case
executed 53 times by 1 test: case 's':
Executed by:
  • truncate
's':
executed 53 times by 1 test: case 's':
Executed by:
  • truncate
53
401-
402 while (-
403 ((*
((*__ctype_b_l...int) _ISspace)Description
TRUEevaluated 3 times by 1 test
Evaluated by:
  • truncate
FALSEevaluated 53 times by 1 test
Evaluated by:
  • truncate
__ctype_b_loc ())[(int) ((
((*__ctype_b_l...int) _ISspace)Description
TRUEevaluated 3 times by 1 test
Evaluated by:
  • truncate
FALSEevaluated 53 times by 1 test
Evaluated by:
  • truncate
3-53
404 to_uchar (*optarg)
((*__ctype_b_l...int) _ISspace)Description
TRUEevaluated 3 times by 1 test
Evaluated by:
  • truncate
FALSEevaluated 53 times by 1 test
Evaluated by:
  • truncate
3-53
405 ))] & (unsigned short int) _ISspace)
((*__ctype_b_l...int) _ISspace)Description
TRUEevaluated 3 times by 1 test
Evaluated by:
  • truncate
FALSEevaluated 53 times by 1 test
Evaluated by:
  • truncate
3-53
406 )-
407 optarg++;
executed 3 times by 1 test: optarg++;
Executed by:
  • truncate
3
408 switch (*optarg)-
409 {-
410 case
never executed: case '<':
'<':
never executed: case '<':
0
411 rel_mode = rm_max;-
412 optarg++;-
413 break;
never executed: break;
0
414 case
executed 3 times by 1 test: case '>':
Executed by:
  • truncate
'>':
executed 3 times by 1 test: case '>':
Executed by:
  • truncate
3
415 rel_mode = rm_min;-
416 optarg++;-
417 break;
executed 3 times by 1 test: break;
Executed by:
  • truncate
3
418 case
executed 1 time by 1 test: case '/':
Executed by:
  • truncate
'/':
executed 1 time by 1 test: case '/':
Executed by:
  • truncate
1
419 rel_mode = rm_rdn;-
420 optarg++;-
421 break;
executed 1 time by 1 test: break;
Executed by:
  • truncate
1
422 case
executed 1 time by 1 test: case '%':
Executed by:
  • truncate
'%':
executed 1 time by 1 test: case '%':
Executed by:
  • truncate
1
423 rel_mode = rm_rup;-
424 optarg++;-
425 break;
executed 1 time by 1 test: break;
Executed by:
  • truncate
1
426 }-
427-
428 while (-
429 ((*
((*__ctype_b_l...int) _ISspace)Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • truncate
FALSEevaluated 53 times by 1 test
Evaluated by:
  • truncate
__ctype_b_loc ())[(int) ((
((*__ctype_b_l...int) _ISspace)Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • truncate
FALSEevaluated 53 times by 1 test
Evaluated by:
  • truncate
1-53
430 to_uchar (*optarg)
((*__ctype_b_l...int) _ISspace)Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • truncate
FALSEevaluated 53 times by 1 test
Evaluated by:
  • truncate
1-53
431 ))] & (unsigned short int) _ISspace)
((*__ctype_b_l...int) _ISspace)Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • truncate
FALSEevaluated 53 times by 1 test
Evaluated by:
  • truncate
1-53
432 )-
433 optarg++;
executed 1 time by 1 test: optarg++;
Executed by:
  • truncate
1
434 if (*
*optarg == '+'Description
TRUEevaluated 7 times by 1 test
Evaluated by:
  • truncate
FALSEevaluated 46 times by 1 test
Evaluated by:
  • truncate
optarg == '+'
*optarg == '+'Description
TRUEevaluated 7 times by 1 test
Evaluated by:
  • truncate
FALSEevaluated 46 times by 1 test
Evaluated by:
  • truncate
|| *
*optarg == '-'Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • truncate
FALSEevaluated 42 times by 1 test
Evaluated by:
  • truncate
optarg == '-'
*optarg == '-'Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • truncate
FALSEevaluated 42 times by 1 test
Evaluated by:
  • truncate
)
4-46
435 {-
436 if (rel_mode
rel_modeDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • truncate
FALSEevaluated 9 times by 1 test
Evaluated by:
  • truncate
)
2-9
437 {-
438 error (0, 0, -
439 dcgettext (((void *)0), -
440 "multiple relative modifiers specified"-
441 , 5)-
442 );-
443-
444 usage (-
445 1-
446 );-
447 }
never executed: end of block
0
448 rel_mode = rm_rel;-
449 }
executed 9 times by 1 test: end of block
Executed by:
  • truncate
9
450-
451-
452 size = xdectoimax (optarg, ((off_t) ~ ((off_t) (! (! ((off_t) 0 < (off_t) -1)) ? (off_t) -1 : ((((off_t) 1 << ((sizeof (off_t) * 8) - 2)) - 1) * 2 + 1)))), ((off_t) (! (! ((off_t) 0 < (off_t) -1)) ? (off_t) -1 : ((((off_t) 1 << ((sizeof (off_t) * 8) - 2)) - 1) * 2 + 1))), "EgGkKmMPtTYZ0",-
453 -
454 dcgettext (((void *)0), -
455 "Invalid number"-
456 , 5)-
457 , 0);-
458-
459 if ((rel_mode == rm_rup
rel_mode == rm_rupDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • truncate
FALSEevaluated 44 times by 1 test
Evaluated by:
  • truncate
|| rel_mode == rm_rdn
rel_mode == rm_rdnDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • truncate
FALSEevaluated 43 times by 1 test
Evaluated by:
  • truncate
) && size == 0
size == 0Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • truncate
FALSEnever evaluated
)
0-44
460 ((
executed 2 times by 1 test: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"division by zero\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "division by zero" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "division by zero" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
Executed by:
  • truncate
!!sizeof (struct { _Static_assert (
executed 2 times by 1 test: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"division by zero\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "division by zero" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "division by zero" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
Executed by:
  • truncate
2
461 1
executed 2 times by 1 test: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"division by zero\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "division by zero" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "division by zero" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
Executed by:
  • truncate
2
462 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"division by zero\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error (
executed 2 times by 1 test: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"division by zero\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "division by zero" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "division by zero" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
Executed by:
  • truncate
2
463 1
executed 2 times by 1 test: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"division by zero\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "division by zero" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "division by zero" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
Executed by:
  • truncate
2
464 , 0,
executed 2 times by 1 test: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"division by zero\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "division by zero" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "division by zero" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
Executed by:
  • truncate
2
465 dcgettext (((void *)0),
executed 2 times by 1 test: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"division by zero\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "division by zero" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "division by zero" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
Executed by:
  • truncate
2
466 "division by zero"
executed 2 times by 1 test: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"division by zero\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "division by zero" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "division by zero" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
Executed by:
  • truncate
2
467 , 5)
executed 2 times by 1 test: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"division by zero\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "division by zero" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "division by zero" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
Executed by:
  • truncate
2
468 ), ((
executed 2 times by 1 test: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"division by zero\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "division by zero" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "division by zero" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
Executed by:
  • truncate
2
469 0
executed 2 times by 1 test: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"division by zero\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "division by zero" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "division by zero" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
Executed by:
  • truncate
2
470 ) ? (void) 0 : __builtin_unreachable ()))) : ((error (
executed 2 times by 1 test: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"division by zero\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "division by zero" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "division by zero" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
Executed by:
  • truncate
2
471 1
executed 2 times by 1 test: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"division by zero\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "division by zero" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "division by zero" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
Executed by:
  • truncate
2
472 , 0,
executed 2 times by 1 test: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"division by zero\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "division by zero" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "division by zero" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
Executed by:
  • truncate
2
473 dcgettext (((void *)0),
executed 2 times by 1 test: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"division by zero\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "division by zero" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "division by zero" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
Executed by:
  • truncate
2
474 "division by zero"
executed 2 times by 1 test: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"division by zero\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "division by zero" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "division by zero" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
Executed by:
  • truncate
2
475 , 5)
executed 2 times by 1 test: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"division by zero\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "division by zero" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "division by zero" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
Executed by:
  • truncate
2
476 ), ((
executed 2 times by 1 test: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"division by zero\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "division by zero" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "division by zero" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
Executed by:
  • truncate
2
477 0
executed 2 times by 1 test: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"division by zero\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "division by zero" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "division by zero" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
Executed by:
  • truncate
2
478 ) ? (void) 0 : __builtin_unreachable ()))));
executed 2 times by 1 test: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"division by zero\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "division by zero" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "division by zero" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
Executed by:
  • truncate
2
479 got_size = -
480 1-
481 ;-
482 break;
executed 43 times by 1 test: break;
Executed by:
  • truncate
43
483-
484 case
executed 9 times by 1 test: case GETOPT_HELP_CHAR:
Executed by:
  • truncate
GETOPT_HELP_CHAR:
executed 9 times by 1 test: case GETOPT_HELP_CHAR:
Executed by:
  • truncate
usage (
9
485 0-
486 ); break;
never executed: break;
;
0
487-
488 case
executed 12 times by 1 test: case GETOPT_VERSION_CHAR:
Executed by:
  • truncate
GETOPT_VERSION_CHAR:
executed 12 times by 1 test: case GETOPT_VERSION_CHAR:
Executed by:
  • truncate
version_etc (
12
489 stdout-
490 , "truncate", "GNU coreutils", Version, ("Padraig Brady"), (char *) -
491 ((void *)0)-
492 ); exit (
executed 12 times by 1 test: exit ( 0 );
Executed by:
  • truncate
12
493 0
executed 12 times by 1 test: exit ( 0 );
Executed by:
  • truncate
12
494 );
executed 12 times by 1 test: exit ( 0 );
Executed by:
  • truncate
break;
never executed: break;
;
0-12
495-
496 default
executed 3 times by 1 test: default:
Executed by:
  • truncate
:
executed 3 times by 1 test: default:
Executed by:
  • truncate
3
497 usage (-
498 1-
499 );-
500 }
never executed: end of block
0
501 }-
502-
503 argv += optind;-
504 argc -= optind;-
505-
506-
507 if (!ref_file
!ref_fileDescription
TRUEevaluated 42 times by 1 test
Evaluated by:
  • truncate
FALSEevaluated 6 times by 1 test
Evaluated by:
  • truncate
&& !got_size
!got_sizeDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • truncate
FALSEevaluated 41 times by 1 test
Evaluated by:
  • truncate
)
1-42
508 {-
509 error (0, 0, -
510 dcgettext (((void *)0), -
511 "you must specify either %s or %s"-
512 , 5)-
513 ,-
514 quote_n (0, "--size"), quote_n (1, "--reference"));-
515 usage (-
516 1-
517 );-
518 }
never executed: end of block
0
519-
520 if (ref_file
ref_fileDescription
TRUEevaluated 6 times by 1 test
Evaluated by:
  • truncate
FALSEevaluated 41 times by 1 test
Evaluated by:
  • truncate
&& got_size
got_sizeDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • truncate
FALSEevaluated 4 times by 1 test
Evaluated by:
  • truncate
&& !rel_mode
!rel_modeDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • truncate
FALSEevaluated 1 time by 1 test
Evaluated by:
  • truncate
)
1-41
521 {-
522 error (0, 0, -
523 dcgettext (((void *)0), -
524 "you must specify a relative %s with %s"-
525 , 5)-
526 ,-
527 quote_n (0, "--size"), quote_n (1, "--reference"));-
528 usage (-
529 1-
530 );-
531 }
never executed: end of block
0
532-
533 if (block_mode
block_modeDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • truncate
FALSEevaluated 44 times by 1 test
Evaluated by:
  • truncate
&& !got_size
!got_sizeDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • truncate
FALSEevaluated 1 time by 1 test
Evaluated by:
  • truncate
)
1-44
534 {-
535 error (0, 0, -
536 dcgettext (((void *)0), -
537 "%s was specified but %s was not"-
538 , 5)-
539 ,-
540 quote_n (0, "--io-blocks"), quote_n (1, "--size"));-
541 usage (-
542 1-
543 );-
544 }
never executed: end of block
0
545-
546 if (argc < 1
argc < 1Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • truncate
FALSEevaluated 44 times by 1 test
Evaluated by:
  • truncate
)
1-44
547 {-
548 error (0, 0, -
549 dcgettext (((void *)0), -
550 "missing file operand"-
551 , 5)-
552 );-
553 usage (-
554 1-
555 );-
556 }
never executed: end of block
0
557-
558 if (ref_file
ref_fileDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • truncate
FALSEevaluated 40 times by 1 test
Evaluated by:
  • truncate
)
4-40
559 {-
560 struct stat sb;-
561 off_t file_size = -1;-
562 if (stat (ref_file, &sb) != 0
stat (ref_file, &sb) != 0Description
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • truncate
)
0-4
563 ((
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), dcgettext (((void *)0), \"cannot stat %s\", 5), quotearg_style (shell_escape_always_quoting_style, ref_file)), assume (false))" ")"); int _gl_dummy; }))...le)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "cannot stat %s" , 5) , quotearg_style (shell_escape_always_quoting_style, ref_file)), (( 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 stat %s\", 5), quotearg_style (shell_escape_always_quoting_style, ref_file)), assume (false))" ")"); int _gl_dummy; }))...le)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "cannot stat %s" , 5) , quotearg_style (shell_escape_always_quoting_style, ref_file)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
564 1
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), dcgettext (((void *)0), \"cannot stat %s\", 5), quotearg_style (shell_escape_always_quoting_style, ref_file)), assume (false))" ")"); int _gl_dummy; }))...le)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "cannot stat %s" , 5) , quotearg_style (shell_escape_always_quoting_style, ref_file)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
565 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), dcgettext (((void *)0), \"cannot stat %s\", 5), quotearg_style (shell_escape_always_quoting_style, ref_file)), assume (false))" ")"); int _gl_dummy; })) ? ((error (
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), dcgettext (((void *)0), \"cannot stat %s\", 5), quotearg_style (shell_escape_always_quoting_style, ref_file)), assume (false))" ")"); int _gl_dummy; }))...le)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "cannot stat %s" , 5) , quotearg_style (shell_escape_always_quoting_style, ref_file)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
566 1
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), dcgettext (((void *)0), \"cannot stat %s\", 5), quotearg_style (shell_escape_always_quoting_style, ref_file)), assume (false))" ")"); int _gl_dummy; }))...le)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "cannot stat %s" , 5) , quotearg_style (shell_escape_always_quoting_style, ref_file)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
567 ,
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), dcgettext (((void *)0), \"cannot stat %s\", 5), quotearg_style (shell_escape_always_quoting_style, ref_file)), assume (false))" ")"); int _gl_dummy; }))...le)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "cannot stat %s" , 5) , quotearg_style (shell_escape_always_quoting_style, ref_file)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
568 (*__errno_location ())
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), dcgettext (((void *)0), \"cannot stat %s\", 5), quotearg_style (shell_escape_always_quoting_style, ref_file)), assume (false))" ")"); int _gl_dummy; }))...le)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "cannot stat %s" , 5) , quotearg_style (shell_escape_always_quoting_style, ref_file)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
569 ,
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), dcgettext (((void *)0), \"cannot stat %s\", 5), quotearg_style (shell_escape_always_quoting_style, ref_file)), assume (false))" ")"); int _gl_dummy; }))...le)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "cannot stat %s" , 5) , quotearg_style (shell_escape_always_quoting_style, ref_file)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
570 dcgettext (((void *)0),
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), dcgettext (((void *)0), \"cannot stat %s\", 5), quotearg_style (shell_escape_always_quoting_style, ref_file)), assume (false))" ")"); int _gl_dummy; }))...le)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "cannot stat %s" , 5) , quotearg_style (shell_escape_always_quoting_style, ref_file)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
571 "cannot stat %s"
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), dcgettext (((void *)0), \"cannot stat %s\", 5), quotearg_style (shell_escape_always_quoting_style, ref_file)), assume (false))" ")"); int _gl_dummy; }))...le)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "cannot stat %s" , 5) , quotearg_style (shell_escape_always_quoting_style, ref_file)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
572 , 5)
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), dcgettext (((void *)0), \"cannot stat %s\", 5), quotearg_style (shell_escape_always_quoting_style, ref_file)), assume (false))" ")"); int _gl_dummy; }))...le)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "cannot stat %s" , 5) , quotearg_style (shell_escape_always_quoting_style, ref_file)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
573 , quotearg_style (shell_escape_always_quoting_style, ref_file)), ((
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), dcgettext (((void *)0), \"cannot stat %s\", 5), quotearg_style (shell_escape_always_quoting_style, ref_file)), assume (false))" ")"); int _gl_dummy; }))...le)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "cannot stat %s" , 5) , quotearg_style (shell_escape_always_quoting_style, ref_file)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
574 0
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), dcgettext (((void *)0), \"cannot stat %s\", 5), quotearg_style (shell_escape_always_quoting_style, ref_file)), assume (false))" ")"); int _gl_dummy; }))...le)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "cannot stat %s" , 5) , quotearg_style (shell_escape_always_quoting_style, ref_file)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
575 ) ? (void) 0 : __builtin_unreachable ()))) : ((error (
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), dcgettext (((void *)0), \"cannot stat %s\", 5), quotearg_style (shell_escape_always_quoting_style, ref_file)), assume (false))" ")"); int _gl_dummy; }))...le)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "cannot stat %s" , 5) , quotearg_style (shell_escape_always_quoting_style, ref_file)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
576 1
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), dcgettext (((void *)0), \"cannot stat %s\", 5), quotearg_style (shell_escape_always_quoting_style, ref_file)), assume (false))" ")"); int _gl_dummy; }))...le)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "cannot stat %s" , 5) , quotearg_style (shell_escape_always_quoting_style, ref_file)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
577 ,
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), dcgettext (((void *)0), \"cannot stat %s\", 5), quotearg_style (shell_escape_always_quoting_style, ref_file)), assume (false))" ")"); int _gl_dummy; }))...le)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "cannot stat %s" , 5) , quotearg_style (shell_escape_always_quoting_style, ref_file)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
578 (*__errno_location ())
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), dcgettext (((void *)0), \"cannot stat %s\", 5), quotearg_style (shell_escape_always_quoting_style, ref_file)), assume (false))" ")"); int _gl_dummy; }))...le)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "cannot stat %s" , 5) , quotearg_style (shell_escape_always_quoting_style, ref_file)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
579 ,
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), dcgettext (((void *)0), \"cannot stat %s\", 5), quotearg_style (shell_escape_always_quoting_style, ref_file)), assume (false))" ")"); int _gl_dummy; }))...le)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "cannot stat %s" , 5) , quotearg_style (shell_escape_always_quoting_style, ref_file)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
580 dcgettext (((void *)0),
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), dcgettext (((void *)0), \"cannot stat %s\", 5), quotearg_style (shell_escape_always_quoting_style, ref_file)), assume (false))" ")"); int _gl_dummy; }))...le)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "cannot stat %s" , 5) , quotearg_style (shell_escape_always_quoting_style, ref_file)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
581 "cannot stat %s"
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), dcgettext (((void *)0), \"cannot stat %s\", 5), quotearg_style (shell_escape_always_quoting_style, ref_file)), assume (false))" ")"); int _gl_dummy; }))...le)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "cannot stat %s" , 5) , quotearg_style (shell_escape_always_quoting_style, ref_file)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
582 , 5)
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), dcgettext (((void *)0), \"cannot stat %s\", 5), quotearg_style (shell_escape_always_quoting_style, ref_file)), assume (false))" ")"); int _gl_dummy; }))...le)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "cannot stat %s" , 5) , quotearg_style (shell_escape_always_quoting_style, ref_file)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
583 , quotearg_style (shell_escape_always_quoting_style, ref_file)), ((
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), dcgettext (((void *)0), \"cannot stat %s\", 5), quotearg_style (shell_escape_always_quoting_style, ref_file)), assume (false))" ")"); int _gl_dummy; }))...le)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "cannot stat %s" , 5) , quotearg_style (shell_escape_always_quoting_style, ref_file)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
584 0
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), dcgettext (((void *)0), \"cannot stat %s\", 5), quotearg_style (shell_escape_always_quoting_style, ref_file)), assume (false))" ")"); int _gl_dummy; }))...le)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "cannot stat %s" , 5) , quotearg_style (shell_escape_always_quoting_style, ref_file)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
585 ) ? (void) 0 : __builtin_unreachable ()))));
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), dcgettext (((void *)0), \"cannot stat %s\", 5), quotearg_style (shell_escape_always_quoting_style, ref_file)), assume (false))" ")"); int _gl_dummy; }))...le)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "cannot stat %s" , 5) , quotearg_style (shell_escape_always_quoting_style, ref_file)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
586 if (usable_st_size (&sb)
usable_st_size (&sb)Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • truncate
FALSEnever evaluated
)
0-4
587 file_size = sb.st_size;
executed 4 times by 1 test: file_size = sb.st_size;
Executed by:
  • truncate
4
588 else-
589 {-
590 int ref_fd = open (ref_file, -
591 00-
592 );-
593 if (0 <= ref_fd
0 <= ref_fdDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
594 {-
595 off_t file_end = lseek (ref_fd, 0, -
596 2-
597 );-
598 int saved_errno = -
599 (*__errno_location ())-
600 ;-
601 close (ref_fd);-
602 if (0 <= file_end
0 <= file_endDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
603 file_size = file_end;
never executed: file_size = file_end;
0
604 else-
605 {-
606-
607 -
608 (*__errno_location ()) -
609 = saved_errno;-
610 }
never executed: end of block
0
611 }-
612 }
never executed: end of block
0
613 if (file_size < 0
file_size < 0Description
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • truncate
)
0-4
614 ((
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), dcgettext (((void *)0), \"cannot get the size of %s\", 5), quotearg_style (shell_escape_always_quoting_style, ref_file)), assume (false))" ")"); int _gl... ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "cannot get the size of %s" , 5) , quotearg_style (shell_escape_always_quoting_style, ref_file)), (( 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 get the size of %s\", 5), quotearg_style (shell_escape_always_quoting_style, ref_file)), assume (false))" ")"); int _gl... ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "cannot get the size of %s" , 5) , quotearg_style (shell_escape_always_quoting_style, ref_file)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ;
0
615 1
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), dcgettext (((void *)0), \"cannot get the size of %s\", 5), quotearg_style (shell_escape_always_quoting_style, ref_file)), assume (false))" ")"); int _gl... ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "cannot get the size of %s" , 5) , quotearg_style (shell_escape_always_quoting_style, ref_file)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ;
0
616 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), dcgettext (((void *)0), \"cannot get the size of %s\", 5), quotearg_style (shell_escape_always_quoting_style, ref_file)), assume (false))" ")"); int _gl_dummy; })) ? ((error (
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), dcgettext (((void *)0), \"cannot get the size of %s\", 5), quotearg_style (shell_escape_always_quoting_style, ref_file)), assume (false))" ")"); int _gl... ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "cannot get the size of %s" , 5) , quotearg_style (shell_escape_always_quoting_style, ref_file)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ;
0
617 1
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), dcgettext (((void *)0), \"cannot get the size of %s\", 5), quotearg_style (shell_escape_always_quoting_style, ref_file)), assume (false))" ")"); int _gl... ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "cannot get the size of %s" , 5) , quotearg_style (shell_escape_always_quoting_style, ref_file)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ;
0
618 ,
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), dcgettext (((void *)0), \"cannot get the size of %s\", 5), quotearg_style (shell_escape_always_quoting_style, ref_file)), assume (false))" ")"); int _gl... ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "cannot get the size of %s" , 5) , quotearg_style (shell_escape_always_quoting_style, ref_file)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ;
0
619 (*__errno_location ())
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), dcgettext (((void *)0), \"cannot get the size of %s\", 5), quotearg_style (shell_escape_always_quoting_style, ref_file)), assume (false))" ")"); int _gl... ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "cannot get the size of %s" , 5) , quotearg_style (shell_escape_always_quoting_style, ref_file)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ;
0
620 ,
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), dcgettext (((void *)0), \"cannot get the size of %s\", 5), quotearg_style (shell_escape_always_quoting_style, ref_file)), assume (false))" ")"); int _gl... ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "cannot get the size of %s" , 5) , quotearg_style (shell_escape_always_quoting_style, ref_file)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ;
0
621 dcgettext (((void *)0),
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), dcgettext (((void *)0), \"cannot get the size of %s\", 5), quotearg_style (shell_escape_always_quoting_style, ref_file)), assume (false))" ")"); int _gl... ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "cannot get the size of %s" , 5) , quotearg_style (shell_escape_always_quoting_style, ref_file)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ;
0
622 "cannot get the size of %s"
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), dcgettext (((void *)0), \"cannot get the size of %s\", 5), quotearg_style (shell_escape_always_quoting_style, ref_file)), assume (false))" ")"); int _gl... ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "cannot get the size of %s" , 5) , quotearg_style (shell_escape_always_quoting_style, ref_file)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ;
0
623 , 5)
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), dcgettext (((void *)0), \"cannot get the size of %s\", 5), quotearg_style (shell_escape_always_quoting_style, ref_file)), assume (false))" ")"); int _gl... ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "cannot get the size of %s" , 5) , quotearg_style (shell_escape_always_quoting_style, ref_file)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ;
0
624 , quotearg_style (shell_escape_always_quoting_style, ref_file)), ((
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), dcgettext (((void *)0), \"cannot get the size of %s\", 5), quotearg_style (shell_escape_always_quoting_style, ref_file)), assume (false))" ")"); int _gl... ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "cannot get the size of %s" , 5) , quotearg_style (shell_escape_always_quoting_style, ref_file)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ;
0
625 0
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), dcgettext (((void *)0), \"cannot get the size of %s\", 5), quotearg_style (shell_escape_always_quoting_style, ref_file)), assume (false))" ")"); int _gl... ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "cannot get the size of %s" , 5) , quotearg_style (shell_escape_always_quoting_style, ref_file)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ;
0
626 ) ? (void) 0 : __builtin_unreachable ()))) : ((error (
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), dcgettext (((void *)0), \"cannot get the size of %s\", 5), quotearg_style (shell_escape_always_quoting_style, ref_file)), assume (false))" ")"); int _gl... ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "cannot get the size of %s" , 5) , quotearg_style (shell_escape_always_quoting_style, ref_file)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ;
0
627 1
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), dcgettext (((void *)0), \"cannot get the size of %s\", 5), quotearg_style (shell_escape_always_quoting_style, ref_file)), assume (false))" ")"); int _gl... ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "cannot get the size of %s" , 5) , quotearg_style (shell_escape_always_quoting_style, ref_file)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ;
0
628 ,
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), dcgettext (((void *)0), \"cannot get the size of %s\", 5), quotearg_style (shell_escape_always_quoting_style, ref_file)), assume (false))" ")"); int _gl... ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "cannot get the size of %s" , 5) , quotearg_style (shell_escape_always_quoting_style, ref_file)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ;
0
629 (*__errno_location ())
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), dcgettext (((void *)0), \"cannot get the size of %s\", 5), quotearg_style (shell_escape_always_quoting_style, ref_file)), assume (false))" ")"); int _gl... ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "cannot get the size of %s" , 5) , quotearg_style (shell_escape_always_quoting_style, ref_file)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ;
0
630 ,
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), dcgettext (((void *)0), \"cannot get the size of %s\", 5), quotearg_style (shell_escape_always_quoting_style, ref_file)), assume (false))" ")"); int _gl... ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "cannot get the size of %s" , 5) , quotearg_style (shell_escape_always_quoting_style, ref_file)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ;
0
631 dcgettext (((void *)0),
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), dcgettext (((void *)0), \"cannot get the size of %s\", 5), quotearg_style (shell_escape_always_quoting_style, ref_file)), assume (false))" ")"); int _gl... ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "cannot get the size of %s" , 5) , quotearg_style (shell_escape_always_quoting_style, ref_file)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ;
0
632 "cannot get the size of %s"
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), dcgettext (((void *)0), \"cannot get the size of %s\", 5), quotearg_style (shell_escape_always_quoting_style, ref_file)), assume (false))" ")"); int _gl... ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "cannot get the size of %s" , 5) , quotearg_style (shell_escape_always_quoting_style, ref_file)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ;
0
633 , 5)
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), dcgettext (((void *)0), \"cannot get the size of %s\", 5), quotearg_style (shell_escape_always_quoting_style, ref_file)), assume (false))" ")"); int _gl... ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "cannot get the size of %s" , 5) , quotearg_style (shell_escape_always_quoting_style, ref_file)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ;
0
634 , quotearg_style (shell_escape_always_quoting_style, ref_file)), ((
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), dcgettext (((void *)0), \"cannot get the size of %s\", 5), quotearg_style (shell_escape_always_quoting_style, ref_file)), assume (false))" ")"); int _gl... ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "cannot get the size of %s" , 5) , quotearg_style (shell_escape_always_quoting_style, ref_file)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ;
0
635 0
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), dcgettext (((void *)0), \"cannot get the size of %s\", 5), quotearg_style (shell_escape_always_quoting_style, ref_file)), assume (false))" ")"); int _gl... ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "cannot get the size of %s" , 5) , quotearg_style (shell_escape_always_quoting_style, ref_file)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ;
0
636 ) ? (void) 0 : __builtin_unreachable ()))))
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), dcgettext (((void *)0), \"cannot get the size of %s\", 5), quotearg_style (shell_escape_always_quoting_style, ref_file)), assume (false))" ")"); int _gl... ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "cannot get the size of %s" , 5) , quotearg_style (shell_escape_always_quoting_style, ref_file)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ;
0
637 ;
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), dcgettext (((void *)0), \"cannot get the size of %s\", 5), quotearg_style (shell_escape_always_quoting_style, ref_file)), assume (false))" ")"); int _gl... ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "cannot get the size of %s" , 5) , quotearg_style (shell_escape_always_quoting_style, ref_file)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ;
0
638 if (!got_size
!got_sizeDescription
TRUEevaluated 3 times by 1 test
Evaluated by:
  • truncate
FALSEevaluated 1 time by 1 test
Evaluated by:
  • truncate
)
1-3
639 size = file_size;
executed 3 times by 1 test: size = file_size;
Executed by:
  • truncate
3
640 else-
641 rsize = file_size;
executed 1 time by 1 test: rsize = file_size;
Executed by:
  • truncate
1
642 }-
643-
644 oflags = -
645 01 -
646 | (no_create ? 0 : -
647 0100-
648 ) | -
649 04000-
650 ;-
651-
652 while ((
(fname = *argv...!= ((void *)0)Description
TRUEevaluated 44 times by 1 test
Evaluated by:
  • truncate
FALSEevaluated 44 times by 1 test
Evaluated by:
  • truncate
fname = *argv++) !=
(fname = *argv...!= ((void *)0)Description
TRUEevaluated 44 times by 1 test
Evaluated by:
  • truncate
FALSEevaluated 44 times by 1 test
Evaluated by:
  • truncate
44
653 ((void *)0)
(fname = *argv...!= ((void *)0)Description
TRUEevaluated 44 times by 1 test
Evaluated by:
  • truncate
FALSEevaluated 44 times by 1 test
Evaluated by:
  • truncate
44
654 )-
655 {-
656 if ((
(fd = open (fn...> 3) ))) == -1Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • truncate
FALSEevaluated 38 times by 1 test
Evaluated by:
  • truncate
fd = open (fname, oflags, (
(fd = open (fn...> 3) ))) == -1Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • truncate
FALSEevaluated 38 times by 1 test
Evaluated by:
  • truncate
6-38
657 0400
(fd = open (fn...> 3) ))) == -1Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • truncate
FALSEevaluated 38 times by 1 test
Evaluated by:
  • truncate
6-38
658 |
(fd = open (fn...> 3) ))) == -1Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • truncate
FALSEevaluated 38 times by 1 test
Evaluated by:
  • truncate
6-38
659 0200
(fd = open (fn...> 3) ))) == -1Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • truncate
FALSEevaluated 38 times by 1 test
Evaluated by:
  • truncate
6-38
660 |
(fd = open (fn...> 3) ))) == -1Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • truncate
FALSEevaluated 38 times by 1 test
Evaluated by:
  • truncate
6-38
661 (0400 >> 3)
(fd = open (fn...> 3) ))) == -1Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • truncate
FALSEevaluated 38 times by 1 test
Evaluated by:
  • truncate
6-38
662 |
(fd = open (fn...> 3) ))) == -1Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • truncate
FALSEevaluated 38 times by 1 test
Evaluated by:
  • truncate
6-38
663 (0200 >> 3)
(fd = open (fn...> 3) ))) == -1Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • truncate
FALSEevaluated 38 times by 1 test
Evaluated by:
  • truncate
6-38
664 |
(fd = open (fn...> 3) ))) == -1Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • truncate
FALSEevaluated 38 times by 1 test
Evaluated by:
  • truncate
6-38
665 ((0400 >> 3) >> 3)
(fd = open (fn...> 3) ))) == -1Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • truncate
FALSEevaluated 38 times by 1 test
Evaluated by:
  • truncate
6-38
666 |
(fd = open (fn...> 3) ))) == -1Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • truncate
FALSEevaluated 38 times by 1 test
Evaluated by:
  • truncate
6-38
667 ((0200 >> 3) >> 3)
(fd = open (fn...> 3) ))) == -1Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • truncate
FALSEevaluated 38 times by 1 test
Evaluated by:
  • truncate
6-38
668 ))) == -1
(fd = open (fn...> 3) ))) == -1Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • truncate
FALSEevaluated 38 times by 1 test
Evaluated by:
  • truncate
)
6-38
669 {-
670-
671-
672-
673-
674 if (!(no_create
no_createDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • truncate
FALSEevaluated 5 times by 1 test
Evaluated by:
  • truncate
&&
1-5
675 (*
(*__errno_location ()) == 2Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • truncate
FALSEnever evaluated
__errno_location ())
(*__errno_location ()) == 2Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • truncate
FALSEnever evaluated
0-1
676 ==
(*__errno_location ()) == 2Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • truncate
FALSEnever evaluated
0-1
677 2
(*__errno_location ()) == 2Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • truncate
FALSEnever evaluated
0-1
678 ))-
679 {-
680 error (0, -
681 (*__errno_location ())-
682 , -
683 dcgettext (((void *)0), -
684 "cannot open %s for writing"-
685 , 5)-
686 ,-
687 quotearg_style (shell_escape_always_quoting_style, fname));-
688 errors = -
689 1-
690 ;-
691 }
executed 5 times by 1 test: end of block
Executed by:
  • truncate
5
692 continue;
executed 6 times by 1 test: continue;
Executed by:
  • truncate
6
693 }-
694-
695-
696 if (fd != -1
fd != -1Description
TRUEevaluated 38 times by 1 test
Evaluated by:
  • truncate
FALSEnever evaluated
)
0-38
697 {-
698 errors |= !do_ftruncate (fd, fname, size, rsize, rel_mode);-
699 if (close (fd) != 0
close (fd) != 0Description
TRUEnever evaluated
FALSEevaluated 38 times by 1 test
Evaluated by:
  • truncate
)
0-38
700 {-
701 error (0, -
702 (*__errno_location ())-
703 , -
704 dcgettext (((void *)0), -
705 "failed to close %s"-
706 , 5)-
707 , quotearg_style (shell_escape_always_quoting_style, fname));-
708 errors = -
709 1-
710 ;-
711 }
never executed: end of block
0
712 }
executed 38 times by 1 test: end of block
Executed by:
  • truncate
38
713 }
executed 38 times by 1 test: end of block
Executed by:
  • truncate
38
714-
715 return
executed 44 times by 1 test: return errors ? 1 : 0 ;
Executed by:
  • truncate
errors ?
executed 44 times by 1 test: return errors ? 1 : 0 ;
Executed by:
  • truncate
44
716 1
executed 44 times by 1 test: return errors ? 1 : 0 ;
Executed by:
  • truncate
44
717 :
executed 44 times by 1 test: return errors ? 1 : 0 ;
Executed by:
  • truncate
44
718 0
executed 44 times by 1 test: return errors ? 1 : 0 ;
Executed by:
  • truncate
44
719 ;
executed 44 times by 1 test: return errors ? 1 : 0 ;
Executed by:
  • truncate
44
720}-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.1.2