Flexible arrays in ubx_log_string_t and ubx_mga_flash_write_t structures cause a build error with GCC 10 because they are wrapped and followed by another array, which violates the basic principle that the flexible array must be the last element.
Solution
Change wrapping structures to unions and fool compiler into ignoring the violation.
Problem
Flexible arrays in
ubx_log_string_t
andubx_mga_flash_write_t
structures cause a build error with GCC 10 because they are wrapped and followed by another array, which violates the basic principle that the flexible array must be the last element.Solution
Change wrapping structures to unions and fool compiler into ignoring the violation.