stat-util: add new macros for declaring statx variable
Let's deal with the msan initialization issue once for all cases instead of over and over again.
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
#include "macro.h"
|
||||
#include "missing_syscall.h"
|
||||
#include "sparse-endian.h"
|
||||
#include "stat-util.h"
|
||||
#include "stdio-util.h"
|
||||
#include "string-util.h"
|
||||
#include "time-util.h"
|
||||
@@ -154,12 +155,7 @@ static int parse_crtime(le64_t le, usec_t *usec) {
|
||||
}
|
||||
|
||||
int fd_getcrtime_at(int dirfd, const char *name, usec_t *ret, int flags) {
|
||||
struct_statx sx
|
||||
#if HAS_FEATURE_MEMORY_SANITIZER
|
||||
= {}
|
||||
# warning "Explicitly initializing struct statx, to work around msan limitation. Please remove as soon as msan has been updated to not require this."
|
||||
#endif
|
||||
;
|
||||
STRUCT_STATX_DEFINE(sx);
|
||||
usec_t a, b;
|
||||
le64_t le;
|
||||
size_t n;
|
||||
|
||||
Reference in New Issue
Block a user