Skip to content

Commit 87a1027

Browse files
mark uninitialized
1 parent 8362fa5 commit 87a1027

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

libc/src/sys/statvfs/linux/statfs_utils.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@ using LinuxStatFs = statfs;
2626
#endif
2727

2828
LIBC_INLINE cpp::optional<LinuxStatFs> linux_statfs(const char *path) {
29+
#ifdef __clang__
30+
// Disable pattern filling for result buffer: this struct is to be populated
31+
// by the syscall.
32+
[[clang::uninitialized]]
33+
#endif
2934
LinuxStatFs result;
3035
// On 32-bit platforms, original statfs cannot handle large file systems.
3136
// In such cases, SYS_statfs64 is defined and should be used.

0 commit comments

Comments
 (0)