OpenCoverage

fadvise.c

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/coreutils/src/gl/lib/fadvise.c
Source codeSwitch to Preprocessed file
LineSourceCount
1/* Declare an access pattern hint for files.-
2 Copyright (C) 2010-2018 Free Software Foundation, Inc.-
3-
4 This program is free software: you can redistribute it and/or modify-
5 it under the terms of the GNU General Public License as published by-
6 the Free Software Foundation, either version 3 of the License, or-
7 (at your option) any later version.-
8-
9 This program is distributed in the hope that it will be useful,-
10 but WITHOUT ANY WARRANTY; without even the implied warranty of-
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the-
12 GNU General Public License for more details.-
13-
14 You should have received a copy of the GNU General Public License-
15 along with this program. If not, see <https://www.gnu.org/licenses/>. */-
16-
17/* Without this pragma, gcc suggests that (given !HAVE_POSIX_FADVISE)-
18 the fdadvise function might be a candidate for attribute 'const'. */-
19#if (__GNUC__ == 4 && 6 <= __GNUC_MINOR__) || 4 < __GNUC__-
20# pragma GCC diagnostic ignored "-Wsuggest-attribute=const"-
21#endif-
22-
23#include <config.h>-
24#include "fadvise.h"-
25-
26#include <stdio.h>-
27#include <fcntl.h>-
28#include "ignore-value.h"-
29-
30void-
31fdadvise (int fd, off_t offset, off_t len, fadvice_t advice)-
32{-
33#if HAVE_POSIX_FADVISE-
34 ignore_value (posix_fadvise (fd, offset, len, advice));-
35#endif-
36}
executed 24023 times by 32 tests
Executed by:
  • b2sum
  • base32
  • base64
  • cat
  • cksum
  • comm
  • cp
  • cut
  • expand
  • fmt
  • fold
  • ginstall
  • join
  • md5sum
  • mv
  • nl
  • paste
  • pr
  • sha1sum
  • sha224sum
  • sha256sum
  • sha384sum
  • sha512sum
  • shuf
  • sort
  • ...
24023
37-
38void-
39fadvise (FILE *fp, fadvice_t advice)-
40{-
41 if (fp)
adDescription
TRUEevaluated 9700 times by 27 tests
Evaluated by:
  • b2sum
  • base32
  • base64
  • cksum
  • comm
  • cut
  • expand
  • fmt
  • fold
  • join
  • md5sum
  • nl
  • paste
  • pr
  • sha1sum
  • sha224sum
  • sha256sum
  • sha384sum
  • sha512sum
  • shuf
  • sort
  • sum
  • tee
  • tr
  • tsort
  • ...
FALSEevaluated 64 times by 1 test
Evaluated by:
  • sort
64-9700
42 fdadvise (fileno (fp), 0, 0, advice);
executed 9700 times by 27 tests
Executed by:
  • b2sum
  • base32
  • base64
  • cksum
  • comm
  • cut
  • expand
  • fmt
  • fold
  • join
  • md5sum
  • nl
  • paste
  • pr
  • sha1sum
  • sha224sum
  • sha256sum
  • sha384sum
  • sha512sum
  • shuf
  • sort
  • sum
  • tee
  • tr
  • tsort
  • ...
9700
43}
executed 9764 times by 27 tests
Executed by:
  • b2sum
  • base32
  • base64
  • cksum
  • comm
  • cut
  • expand
  • fmt
  • fold
  • join
  • md5sum
  • nl
  • paste
  • pr
  • sha1sum
  • sha224sum
  • sha256sum
  • sha384sum
  • sha512sum
  • shuf
  • sort
  • sum
  • tee
  • tr
  • tsort
  • ...
9764
Source codeSwitch to Preprocessed file

Generated by Squish Coco 4.1.2