]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
regtest: un-inline fdleak close_inherited
authorPaul Floyd <pjfloyd@wanadoo.fr>
Thu, 14 Mar 2024 07:12:23 +0000 (08:12 +0100)
committerPaul Floyd <pjfloyd@wanadoo.fr>
Thu, 14 Mar 2024 07:12:23 +0000 (08:12 +0100)
I don't understand why but clang on FreeBSD arm64 seemed to
optimize away the 'stat' check. That caused failures due
to incorrect duplicate close errors.

none/tests/fdleak.h

index 6695138a413771fc8abb61037a5bce68698e27ae..f0a6eac4933de707a4a08c3f0a68f057f2a0fbff 100644 (file)
@@ -26,7 +26,7 @@
  * - For Ubuntu 8.04, see also
  *   https://bugs.launchpad.net/ubuntu/+source/seahorse/+bug/235184
  */
-static inline void close_inherited () {
+static void close_inherited (void) {
    struct stat sb;
    int i; int max_fds = sysconf (_SC_OPEN_MAX);
    if (max_fds < 0)