Modify a data structure into a union.
The new 6.0 kernel headers changed all variable length structures from [0] to []. This causes a clang warning to trigger, so rewrite the affected data structure using a union to avoid having a variable sized array in the middle of the structure. Test: Builds. Change-Id: I60c6d31a93566c4aa9f7501f39f88543ee76ce91
This commit is contained in:
parent
dcbe8650b6
commit
8b0619b47d
1 changed files with 2 additions and 2 deletions
|
@ -194,9 +194,9 @@ void FileConnectionDetector::handleInotifyData(ssize_t len, const char *data) {
|
|||
}
|
||||
|
||||
bool FileConnectionDetector::readInotifyData() {
|
||||
struct {
|
||||
union {
|
||||
struct inotify_event ev;
|
||||
char padding[NAME_MAX + 1];
|
||||
char raw[sizeof(inotify_event) + NAME_MAX + 1];
|
||||
} buffer;
|
||||
|
||||
bool ret = true;
|
||||
|
|
Loading…
Reference in a new issue