Skip to content

Commit 87ce6a0

Browse files
committed
fixup! mingw: add a cache below mingw's lstat and dirent implementations
Clang has newly developed an antipathy for unions and arrays of structs that contain flex arrays... Let's just pat clang's head and move on. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 3003038 commit 87ce6a0

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

compat/win32/fscache.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,15 @@ struct fsentry {
7878
};
7979
#pragma GCC diagnostic pop
8080

81+
#pragma GCC diagnostic push
82+
#pragma GCC diagnostic ignored "-Wflexible-array-extensions"
8183
struct heap_fsentry {
8284
union {
8385
struct fsentry ent;
8486
char dummy[sizeof(struct fsentry) + MAX_LONG_PATH];
8587
} u;
8688
};
89+
#pragma GCC diagnostic pop
8790

8891
/*
8992
* Compares the paths of two fsentry structures for equality.
@@ -596,7 +599,10 @@ void fscache_flush(void)
596599
int fscache_lstat(const char *filename, struct stat *st)
597600
{
598601
int dirlen, base, len;
602+
#pragma GCC diagnostic push
603+
#pragma GCC diagnostic ignored "-Wflexible-array-extensions"
599604
struct heap_fsentry key[2];
605+
#pragma GCC diagnostic pop
600606
struct fsentry *fse;
601607
struct fscache *cache = fscache_getcache();
602608

0 commit comments

Comments
 (0)