[libc-commits] [libc] [libc] implement pathconf/fpathconf (PR #87165)

Mikhail R. Gadelha via libc-commits libc-commits at lists.llvm.org
Mon Jul 8 10:18:19 PDT 2024


mikhailramalho wrote:

folks, this patch broke rv32 compilation: https://lab.llvm.org/staging/#/builders/149/builds/8399
Here's the error:
```
/home/mgadelha/tools/llvm-project/libc/src/sys/statvfs/linux/statfs_utils.h:80:21: error: implicit conversion loses integer precision: 'const __u64' (aka 'const unsigned long long') to 'fsblkcnt_t' (aka 'unsigned int') [-Werror,-Wshorten-64-to-32]
   80 |   out.f_blocks = in.f_blocks;
      |                ~ ~~~^~~~~~~~
/home/mgadelha/tools/llvm-project/libc/src/sys/statvfs/linux/statfs_utils.h:81:20: error: implicit conversion loses integer precision: 'const __u64' (aka 'const unsigned long long') to 'fsblkcnt_t' (aka 'unsigned int') [-Werror,-Wshorten-64-to-32]
   81 |   out.f_bfree = in.f_bfree;
      |               ~ ~~~^~~~~~~
/home/mgadelha/tools/llvm-project/libc/src/sys/statvfs/linux/statfs_utils.h:82:21: error: implicit conversion loses integer precision: 'const __u64' (aka 'const unsigned long long') to 'fsblkcnt_t' (aka 'unsigned int') [-Werror,-Wshorten-64-to-32]
   82 |   out.f_bavail = in.f_bavail;
      |                ~ ~~~^~~~~~~~
/home/mgadelha/tools/llvm-project/libc/src/sys/statvfs/linux/statfs_utils.h:83:20: error: implicit conversion loses integer precision: 'const __u64' (aka 'const unsigned long long') to 'fsfilcnt_t' (aka 'unsigned int') [-Werror,-Wshorten-64-to-32]
   83 |   out.f_files = in.f_files;
      |               ~ ~~~^~~~~~~
/home/mgadelha/tools/llvm-project/libc/src/sys/statvfs/linux/statfs_utils.h:84:20: error: implicit conversion loses integer precision: 'const __u64' (aka 'const unsigned long long') to 'fsfilcnt_t' (aka 'unsigned int') [-Werror,-Wshorten-64-to-32]
   84 |   out.f_ffree = in.f_ffree;
      |               ~ ~~~^~~~~~~
/home/mgadelha/tools/llvm-project/libc/src/sys/statvfs/linux/statfs_utils.h:85:21: error: implicit conversion loses integer precision: 'const __u64' (aka 'const unsigned long long') to 'fsfilcnt_t' (aka 'unsigned int') [-Werror,-Wshorten-64-to-32]
   85 |   out.f_favail = in.f_ffree;
      |                ~ ~~~^~~~~~~
/home/mgadelha/tools/llvm-project/libc/src/sys/statvfs/linux/statfs_utils.h:87:68: error: shift count >= width of type [-Werror,-Wshift-count-overflow]
   87 |                static_cast<decltype(out.f_fsid)>(in.f_fsid.val[1]) << 32;
      |                                                                    ^  ~~
7 errors generated.
```

May I ask if you can take a look?

https://github.com/llvm/llvm-project/pull/87165


More information about the libc-commits mailing list