| Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/coreutils/src/src/truncate.c |
| Switch to Source code | Preprocessed file |
| Line | Source | Count | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | - | |||||||||||||||||||||||||
| 2 | - | |||||||||||||||||||||||||
| 3 | - | |||||||||||||||||||||||||
| 4 | - | |||||||||||||||||||||||||
| 5 | - | |||||||||||||||||||||||||
| 6 | - | |||||||||||||||||||||||||
| 7 | - | |||||||||||||||||||||||||
| 8 | - | |||||||||||||||||||||||||
| 9 | - | |||||||||||||||||||||||||
| 10 | static | - | ||||||||||||||||||||||||
| 11 | _Bool | - | ||||||||||||||||||||||||
| 12 | no_create; | - | ||||||||||||||||||||||||
| 13 | - | |||||||||||||||||||||||||
| 14 | - | |||||||||||||||||||||||||
| 15 | static | - | ||||||||||||||||||||||||
| 16 | _Bool | - | ||||||||||||||||||||||||
| 17 | block_mode; | - | ||||||||||||||||||||||||
| 18 | - | |||||||||||||||||||||||||
| 19 | - | |||||||||||||||||||||||||
| 20 | static char const *ref_file; | - | ||||||||||||||||||||||||
| 21 | - | |||||||||||||||||||||||||
| 22 | static 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 | - | |||||||||||||||||||||||||
| 61 | typedef enum | - | ||||||||||||||||||||||||
| 62 | { rm_abs = 0, rm_rel, rm_min, rm_max, rm_rdn, rm_rup } rel_mode_t; | - | ||||||||||||||||||||||||
| 63 | - | |||||||||||||||||||||||||
| 64 | void | - | ||||||||||||||||||||||||
| 65 | usage (int status) | - | ||||||||||||||||||||||||
| 66 | { | - | ||||||||||||||||||||||||
| 67 | if (status !=
| 9 | ||||||||||||||||||||||||
| 68 | 0
| 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: while (0);end of blockExecuted by:
| 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 blockExecuted by:
| 9 | ||||||||||||||||||||||||
| 156 | exit (status); executed 18 times by 1 test: exit (status);Executed by:
| 18 | ||||||||||||||||||||||||
| 157 | } | - | ||||||||||||||||||||||||
| 158 | - | |||||||||||||||||||||||||
| 159 | - | |||||||||||||||||||||||||
| 160 | static | - | ||||||||||||||||||||||||
| 161 | _Bool | - | ||||||||||||||||||||||||
| 162 | - | |||||||||||||||||||||||||
| 163 | do_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
| 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
| 1-37 | ||||||||||||||||||||||||
| 183 | { | - | ||||||||||||||||||||||||
| 184 | off_t const blksize = ((0 < (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
| 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:
executed 1 time by 1 test: return 0 ;Executed by:
| 1 | ||||||||||||||||||||||||
| 203 | 0 executed 1 time by 1 test: return 0 ;Executed by:
| 1 | ||||||||||||||||||||||||
| 204 | ; executed 1 time by 1 test: return 0 ;Executed by:
| 1 | ||||||||||||||||||||||||
| 205 | } | - | ||||||||||||||||||||||||
| 206 | ssize *= blksize; | - | ||||||||||||||||||||||||
| 207 | } never executed: end of block | 0 | ||||||||||||||||||||||||
| 208 | if (rel_mode
| 6-31 | ||||||||||||||||||||||||
| 209 | { | - | ||||||||||||||||||||||||
| 210 | uintmax_t fsize; | - | ||||||||||||||||||||||||
| 211 | - | |||||||||||||||||||||||||
| 212 | if (0 <= rsize
| 1-5 | ||||||||||||||||||||||||
| 213 | fsize = rsize; executed 1 time by 1 test: fsize = rsize;Executed by:
| 1 | ||||||||||||||||||||||||
| 214 | else | - | ||||||||||||||||||||||||
| 215 | { | - | ||||||||||||||||||||||||
| 216 | off_t file_size; | - | ||||||||||||||||||||||||
| 217 | if (usable_st_size (&sb)
| 0-5 | ||||||||||||||||||||||||
| 218 | { | - | ||||||||||||||||||||||||
| 219 | file_size = sb.st_size; | - | ||||||||||||||||||||||||
| 220 | if (file_size < 0
| 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 blockExecuted by:
| 5 | ||||||||||||||||||||||||
| 235 | else | - | ||||||||||||||||||||||||
| 236 | { | - | ||||||||||||||||||||||||
| 237 | file_size = lseek (fd, 0, | - | ||||||||||||||||||||||||
| 238 | 2 | - | ||||||||||||||||||||||||
| 239 | ); | - | ||||||||||||||||||||||||
| 240 | if (file_size < 0
| 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 blockExecuted by:
| 5 | ||||||||||||||||||||||||
| 257 | - | |||||||||||||||||||||||||
| 258 | if (rel_mode == rm_min
| 1-5 | ||||||||||||||||||||||||
| 259 | nsize = executed 1 time by 1 test: nsize = ((( fsize )>( (uintmax_t) ssize ))?( fsize ):( (uintmax_t) ssize )) ;Executed by:
| 1 | ||||||||||||||||||||||||
| 260 | (((
executed 1 time by 1 test: nsize = ((( fsize )>( (uintmax_t) ssize ))?( fsize ):( (uintmax_t) ssize )) ;Executed by:
| 0-1 | ||||||||||||||||||||||||
| 261 | fsize
executed 1 time by 1 test: nsize = ((( fsize )>( (uintmax_t) ssize ))?( fsize ):( (uintmax_t) ssize )) ;Executed by:
| 0-1 | ||||||||||||||||||||||||
| 262 | )>(
executed 1 time by 1 test: nsize = ((( fsize )>( (uintmax_t) ssize ))?( fsize ):( (uintmax_t) ssize )) ;Executed by:
| 0-1 | ||||||||||||||||||||||||
| 263 | (uintmax_t) ssize
executed 1 time by 1 test: nsize = ((( fsize )>( (uintmax_t) ssize ))?( fsize ):( (uintmax_t) ssize )) ;Executed by:
| 0-1 | ||||||||||||||||||||||||
| 264 | ))
executed 1 time by 1 test: nsize = ((( fsize )>( (uintmax_t) ssize ))?( fsize ):( (uintmax_t) ssize )) ;Executed by:
| 0-1 | ||||||||||||||||||||||||
| 265 | fsize executed 1 time by 1 test: nsize = ((( fsize )>( (uintmax_t) ssize ))?( fsize ):( (uintmax_t) ssize )) ;Executed by:
| 1 | ||||||||||||||||||||||||
| 266 | ):( executed 1 time by 1 test: nsize = ((( fsize )>( (uintmax_t) ssize ))?( fsize ):( (uintmax_t) ssize )) ;Executed by:
| 1 | ||||||||||||||||||||||||
| 267 | (uintmax_t) ssize executed 1 time by 1 test: nsize = ((( fsize )>( (uintmax_t) ssize ))?( fsize ):( (uintmax_t) ssize )) ;Executed by:
| 1 | ||||||||||||||||||||||||
| 268 | )) executed 1 time by 1 test: nsize = ((( fsize )>( (uintmax_t) ssize ))?( fsize ):( (uintmax_t) ssize )) ;Executed by:
| 1 | ||||||||||||||||||||||||
| 269 | ; executed 1 time by 1 test: nsize = ((( fsize )>( (uintmax_t) ssize ))?( fsize ):( (uintmax_t) ssize )) ;Executed by:
| 1 | ||||||||||||||||||||||||
| 270 | else if (rel_mode == rm_max
| 0-5 | ||||||||||||||||||||||||
| 271 | nsize = never executed: nsize = ((( fsize )<( (uintmax_t) ssize ))?( fsize ):( (uintmax_t) ssize )) ; | 0 | ||||||||||||||||||||||||
| 272 | (((
never executed: nsize = ((( fsize )<( (uintmax_t) ssize ))?( fsize ):( (uintmax_t) ssize )) ; | 0 | ||||||||||||||||||||||||
| 273 | fsize
never executed: nsize = ((( fsize )<( (uintmax_t) ssize ))?( fsize ):( (uintmax_t) ssize )) ; | 0 | ||||||||||||||||||||||||
| 274 | )<(
never executed: nsize = ((( fsize )<( (uintmax_t) ssize ))?( fsize ):( (uintmax_t) ssize )) ; | 0 | ||||||||||||||||||||||||
| 275 | (uintmax_t) ssize
never executed: nsize = ((( fsize )<( (uintmax_t) ssize ))?( fsize ):( (uintmax_t) ssize )) ; | 0 | ||||||||||||||||||||||||
| 276 | ))
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
| 0-5 | ||||||||||||||||||||||||
| 283 | - | |||||||||||||||||||||||||
| 284 | nsize = (fsize / ssize) * ssize; never executed: nsize = (fsize / ssize) * ssize; | 0 | ||||||||||||||||||||||||
| 285 | else if (rel_mode == rm_rup
| 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)))
| 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
| 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:
executed 1 time by 1 test: return 0 ;Executed by:
| 1 | ||||||||||||||||||||||||
| 315 | 0 executed 1 time by 1 test: return 0 ;Executed by:
| 1 | ||||||||||||||||||||||||
| 316 | ; executed 1 time by 1 test: return 0 ;Executed by:
| 1 | ||||||||||||||||||||||||
| 317 | } | - | ||||||||||||||||||||||||
| 318 | nsize = fsize + ssize; | - | ||||||||||||||||||||||||
| 319 | } executed 4 times by 1 test: end of blockExecuted by:
| 4 | ||||||||||||||||||||||||
| 320 | } | - | ||||||||||||||||||||||||
| 321 | else | - | ||||||||||||||||||||||||
| 322 | nsize = ssize; executed 31 times by 1 test: nsize = ssize;Executed by:
| 31 | ||||||||||||||||||||||||
| 323 | if (nsize < 0
| 1-35 | ||||||||||||||||||||||||
| 324 | nsize = 0; executed 1 time by 1 test: nsize = 0;Executed by:
| 1 | ||||||||||||||||||||||||
| 325 | - | |||||||||||||||||||||||||
| 326 | if (ftruncate (fd, nsize) == -1
| 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:
executed 1 time by 1 test: return 0 ;Executed by:
| 1 | ||||||||||||||||||||||||
| 340 | 0 executed 1 time by 1 test: return 0 ;Executed by:
| 1 | ||||||||||||||||||||||||
| 341 | ; executed 1 time by 1 test: return 0 ;Executed by:
| 1 | ||||||||||||||||||||||||
| 342 | } | - | ||||||||||||||||||||||||
| 343 | - | |||||||||||||||||||||||||
| 344 | return executed 35 times by 1 test: return 1 ;Executed by:
executed 35 times by 1 test: return 1 ;Executed by:
| 35 | ||||||||||||||||||||||||
| 345 | 1 executed 35 times by 1 test: return 1 ;Executed by:
| 35 | ||||||||||||||||||||||||
| 346 | ; executed 35 times by 1 test: return 1 ;Executed by:
| 35 | ||||||||||||||||||||||||
| 347 | } | - | ||||||||||||||||||||||||
| 348 | - | |||||||||||||||||||||||||
| 349 | int | - | ||||||||||||||||||||||||
| 350 | main (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 ((
| 48-92 | ||||||||||||||||||||||||
| 379 | ((void *)0)
| 48-92 | ||||||||||||||||||||||||
| 380 | )) != -1
| 48-92 | ||||||||||||||||||||||||
| 381 | { | - | ||||||||||||||||||||||||
| 382 | switch (c) | - | ||||||||||||||||||||||||
| 383 | { | - | ||||||||||||||||||||||||
| 384 | case executed 3 times by 1 test: 'c':case 'c':Executed by:
executed 3 times by 1 test: case 'c':Executed by:
| 3 | ||||||||||||||||||||||||
| 385 | no_create = | - | ||||||||||||||||||||||||
| 386 | 1 | - | ||||||||||||||||||||||||
| 387 | ; | - | ||||||||||||||||||||||||
| 388 | break; executed 3 times by 1 test: break;Executed by:
| 3 | ||||||||||||||||||||||||
| 389 | - | |||||||||||||||||||||||||
| 390 | case executed 4 times by 1 test: 'o':case 'o':Executed by:
executed 4 times by 1 test: case 'o':Executed by:
| 4 | ||||||||||||||||||||||||
| 391 | block_mode = | - | ||||||||||||||||||||||||
| 392 | 1 | - | ||||||||||||||||||||||||
| 393 | ; | - | ||||||||||||||||||||||||
| 394 | break; executed 4 times by 1 test: break;Executed by:
| 4 | ||||||||||||||||||||||||
| 395 | - | |||||||||||||||||||||||||
| 396 | case executed 8 times by 1 test: 'r':case 'r':Executed by:
executed 8 times by 1 test: case 'r':Executed by:
| 8 | ||||||||||||||||||||||||
| 397 | ref_file = optarg; | - | ||||||||||||||||||||||||
| 398 | break; executed 8 times by 1 test: break;Executed by:
| 8 | ||||||||||||||||||||||||
| 399 | - | |||||||||||||||||||||||||
| 400 | case executed 53 times by 1 test: 's':case 's':Executed by:
executed 53 times by 1 test: case 's':Executed by:
| 53 | ||||||||||||||||||||||||
| 401 | - | |||||||||||||||||||||||||
| 402 | while ( | - | ||||||||||||||||||||||||
| 403 | ((*
| 3-53 | ||||||||||||||||||||||||
| 404 | to_uchar (*optarg)
| 3-53 | ||||||||||||||||||||||||
| 405 | ))] & (unsigned short int) _ISspace)
| 3-53 | ||||||||||||||||||||||||
| 406 | ) | - | ||||||||||||||||||||||||
| 407 | optarg++; executed 3 times by 1 test: optarg++;Executed by:
| 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:
executed 3 times by 1 test: case '>':Executed by:
| 3 | ||||||||||||||||||||||||
| 415 | rel_mode = rm_min; | - | ||||||||||||||||||||||||
| 416 | optarg++; | - | ||||||||||||||||||||||||
| 417 | break; executed 3 times by 1 test: break;Executed by:
| 3 | ||||||||||||||||||||||||
| 418 | case executed 1 time by 1 test: '/':case '/':Executed by:
executed 1 time by 1 test: case '/':Executed by:
| 1 | ||||||||||||||||||||||||
| 419 | rel_mode = rm_rdn; | - | ||||||||||||||||||||||||
| 420 | optarg++; | - | ||||||||||||||||||||||||
| 421 | break; executed 1 time by 1 test: break;Executed by:
| 1 | ||||||||||||||||||||||||
| 422 | case executed 1 time by 1 test: '%':case '%':Executed by:
executed 1 time by 1 test: case '%':Executed by:
| 1 | ||||||||||||||||||||||||
| 423 | rel_mode = rm_rup; | - | ||||||||||||||||||||||||
| 424 | optarg++; | - | ||||||||||||||||||||||||
| 425 | break; executed 1 time by 1 test: break;Executed by:
| 1 | ||||||||||||||||||||||||
| 426 | } | - | ||||||||||||||||||||||||
| 427 | - | |||||||||||||||||||||||||
| 428 | while ( | - | ||||||||||||||||||||||||
| 429 | ((*
| 1-53 | ||||||||||||||||||||||||
| 430 | to_uchar (*optarg)
| 1-53 | ||||||||||||||||||||||||
| 431 | ))] & (unsigned short int) _ISspace)
| 1-53 | ||||||||||||||||||||||||
| 432 | ) | - | ||||||||||||||||||||||||
| 433 | optarg++; executed 1 time by 1 test: optarg++;Executed by:
| 1 | ||||||||||||||||||||||||
| 434 | if (*
| 4-46 | ||||||||||||||||||||||||
| 435 | { | - | ||||||||||||||||||||||||
| 436 | if (rel_mode
| 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 blockExecuted by:
| 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
| 0-44 | ||||||||||||||||||||||||
| 460 | (( executed 2 times by 1 test: !!sizeof (struct { _Static_assert (((!!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:
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:
| 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:
| 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:
| 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:
| 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:
| 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:
| 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:
| 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:
| 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:
| 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:
| 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:
| 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:
| 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:
| 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:
| 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:
| 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:
| 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:
| 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:
| 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:
| 2 | ||||||||||||||||||||||||
| 479 | got_size = | - | ||||||||||||||||||||||||
| 480 | 1 | - | ||||||||||||||||||||||||
| 481 | ; | - | ||||||||||||||||||||||||
| 482 | break; executed 43 times by 1 test: break;Executed by:
| 43 | ||||||||||||||||||||||||
| 483 | - | |||||||||||||||||||||||||
| 484 | case executed 9 times by 1 test: GETOPT_HELP_CHAR:case GETOPT_HELP_CHAR:Executed by:
executed 9 times by 1 test: usage (case GETOPT_HELP_CHAR:Executed by:
| 9 | ||||||||||||||||||||||||
| 485 | 0 | - | ||||||||||||||||||||||||
| 486 | ); break; never executed: ;break; | 0 | ||||||||||||||||||||||||
| 487 | - | |||||||||||||||||||||||||
| 488 | case executed 12 times by 1 test: GETOPT_VERSION_CHAR:case GETOPT_VERSION_CHAR:Executed by:
executed 12 times by 1 test: version_etc (case GETOPT_VERSION_CHAR:Executed by:
| 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:
| 12 | ||||||||||||||||||||||||
| 493 | 0 executed 12 times by 1 test: exit ( 0 );Executed by:
| 12 | ||||||||||||||||||||||||
| 494 | ); executed 12 times by 1 test: break;exit ( 0 );Executed by:
never executed: ;break; | 0-12 | ||||||||||||||||||||||||
| 495 | - | |||||||||||||||||||||||||
| 496 | default executed 3 times by 1 test: :default:Executed by:
executed 3 times by 1 test: default:Executed by:
| 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
| 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
| 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
| 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
| 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
| 4-40 | ||||||||||||||||||||||||
| 559 | { | - | ||||||||||||||||||||||||
| 560 | struct stat sb; | - | ||||||||||||||||||||||||
| 561 | off_t file_size = -1; | - | ||||||||||||||||||||||||
| 562 | if (stat (ref_file, &sb) != 0
| 0-4 | ||||||||||||||||||||||||
| 563 | (( never executed: !!sizeof (struct { _Static_assert (((!!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 ()))));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)
| 0-4 | ||||||||||||||||||||||||
| 587 | file_size = sb.st_size; executed 4 times by 1 test: file_size = sb.st_size;Executed by:
| 4 | ||||||||||||||||||||||||
| 588 | else | - | ||||||||||||||||||||||||
| 589 | { | - | ||||||||||||||||||||||||
| 590 | int ref_fd = open (ref_file, | - | ||||||||||||||||||||||||
| 591 | 00 | - | ||||||||||||||||||||||||
| 592 | ); | - | ||||||||||||||||||||||||
| 593 | if (0 <= ref_fd
| 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 | ||||||||||||||||||||||||
| 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
| 0-4 | ||||||||||||||||||||||||
| 614 | (( never executed: !!sizeof (struct { _Static_assert (((!!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 ())))) ;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
| 1-3 | ||||||||||||||||||||||||
| 639 | size = file_size; executed 3 times by 1 test: size = file_size;Executed by:
| 3 | ||||||||||||||||||||||||
| 640 | else | - | ||||||||||||||||||||||||
| 641 | rsize = file_size; executed 1 time by 1 test: rsize = file_size;Executed by:
| 1 | ||||||||||||||||||||||||
| 642 | } | - | ||||||||||||||||||||||||
| 643 | - | |||||||||||||||||||||||||
| 644 | oflags = | - | ||||||||||||||||||||||||
| 645 | 01 | - | ||||||||||||||||||||||||
| 646 | | (no_create ? 0 : | - | ||||||||||||||||||||||||
| 647 | 0100 | - | ||||||||||||||||||||||||
| 648 | ) | | - | ||||||||||||||||||||||||
| 649 | 04000 | - | ||||||||||||||||||||||||
| 650 | ; | - | ||||||||||||||||||||||||
| 651 | - | |||||||||||||||||||||||||
| 652 | while ((
| 44 | ||||||||||||||||||||||||
| 653 | ((void *)0)
| 44 | ||||||||||||||||||||||||
| 654 | ) | - | ||||||||||||||||||||||||
| 655 | { | - | ||||||||||||||||||||||||
| 656 | if ((
| 6-38 | ||||||||||||||||||||||||
| 657 | 0400
| 6-38 | ||||||||||||||||||||||||
| 658 | |
| 6-38 | ||||||||||||||||||||||||
| 659 | 0200
| 6-38 | ||||||||||||||||||||||||
| 660 | |
| 6-38 | ||||||||||||||||||||||||
| 661 | (0400 >> 3)
| 6-38 | ||||||||||||||||||||||||
| 662 | |
| 6-38 | ||||||||||||||||||||||||
| 663 | (0200 >> 3)
| 6-38 | ||||||||||||||||||||||||
| 664 | |
| 6-38 | ||||||||||||||||||||||||
| 665 | ((0400 >> 3) >> 3)
| 6-38 | ||||||||||||||||||||||||
| 666 | |
| 6-38 | ||||||||||||||||||||||||
| 667 | ((0200 >> 3) >> 3)
| 6-38 | ||||||||||||||||||||||||
| 668 | ))) == -1
| 6-38 | ||||||||||||||||||||||||
| 669 | { | - | ||||||||||||||||||||||||
| 670 | - | |||||||||||||||||||||||||
| 671 | - | |||||||||||||||||||||||||
| 672 | - | |||||||||||||||||||||||||
| 673 | - | |||||||||||||||||||||||||
| 674 | if (!(no_create
| 1-5 | ||||||||||||||||||||||||
| 675 | (*
| 0-1 | ||||||||||||||||||||||||
| 676 | ==
| 0-1 | ||||||||||||||||||||||||
| 677 | 2
| 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 blockExecuted by:
| 5 | ||||||||||||||||||||||||
| 692 | continue; executed 6 times by 1 test: continue;Executed by:
| 6 | ||||||||||||||||||||||||
| 693 | } | - | ||||||||||||||||||||||||
| 694 | - | |||||||||||||||||||||||||
| 695 | - | |||||||||||||||||||||||||
| 696 | if (fd != -1
| 0-38 | ||||||||||||||||||||||||
| 697 | { | - | ||||||||||||||||||||||||
| 698 | errors |= !do_ftruncate (fd, fname, size, rsize, rel_mode); | - | ||||||||||||||||||||||||
| 699 | if (close (fd) != 0
| 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 blockExecuted by:
| 38 | ||||||||||||||||||||||||
| 713 | } executed 38 times by 1 test: end of blockExecuted by:
| 38 | ||||||||||||||||||||||||
| 714 | - | |||||||||||||||||||||||||
| 715 | return executed 44 times by 1 test: errors ? return errors ? 1 : 0 ;Executed by:
executed 44 times by 1 test: return errors ? 1 : 0 ;Executed by:
| 44 | ||||||||||||||||||||||||
| 716 | 1 executed 44 times by 1 test: return errors ? 1 : 0 ;Executed by:
| 44 | ||||||||||||||||||||||||
| 717 | : executed 44 times by 1 test: return errors ? 1 : 0 ;Executed by:
| 44 | ||||||||||||||||||||||||
| 718 | 0 executed 44 times by 1 test: return errors ? 1 : 0 ;Executed by:
| 44 | ||||||||||||||||||||||||
| 719 | ; executed 44 times by 1 test: return errors ? 1 : 0 ;Executed by:
| 44 | ||||||||||||||||||||||||
| 720 | } | - | ||||||||||||||||||||||||
| Switch to Source code | Preprocessed file |