Fix warnings with -fstrict-flex-arrays=2

Unfortunatley we cannot set it to 2 in hb.hh; but fix the
warning and add it with default value of 1 anyway.

Fixes https://github.com/harfbuzz/harfbuzz/pull/4836
This commit is contained in:
Behdad Esfahbod 2024-08-22 15:45:41 -06:00
parent 634778efc0
commit 16c196e0c3
2 changed files with 2 additions and 1 deletions

View file

@ -209,7 +209,7 @@ struct HBUINT32VAR
}
protected:
unsigned char v[1];
unsigned char v[5];
public:
DEFINE_SIZE_MIN (1);

View file

@ -84,6 +84,7 @@
#pragma GCC diagnostic error "-Wredundant-decls"
#pragma GCC diagnostic error "-Wreorder"
#pragma GCC diagnostic error "-Wsign-compare"
#pragma GCC diagnostic error "-Wstrict-flex-arrays"
#pragma GCC diagnostic error "-Wstrict-prototypes"
#pragma GCC diagnostic error "-Wstring-conversion"
#pragma GCC diagnostic error "-Wswitch-enum"