fix(cpn): 'variable length array' warning (#6205)
This commit is contained in:
@@ -616,13 +616,12 @@ Node EncodeFMData(const FlightModeData& rhs, int phaseIdx)
|
|||||||
Node node;
|
Node node;
|
||||||
|
|
||||||
size_t n_trims = Boards::getCapability(getCurrentBoard(), Board::NumTrims);
|
size_t n_trims = Boards::getCapability(getCurrentBoard(), Board::NumTrims);
|
||||||
YamlTrim yt[n_trims];
|
|
||||||
|
|
||||||
Node trims;
|
Node trims;
|
||||||
for (size_t i=0; i<n_trims; i++) {
|
for (size_t i=0; i<n_trims; i++) {
|
||||||
yt[i] = { rhs.trimMode[i], rhs.trimRef[i], rhs.trim[i] };
|
YamlTrim yt = { rhs.trimMode[i], rhs.trimRef[i], rhs.trim[i] };
|
||||||
if (!yt[i].isEmpty()) {
|
if (!yt.isEmpty()) {
|
||||||
trims[std::to_string(i)] = yt[i];
|
trims[std::to_string(i)] = yt;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (trims && trims.IsMap()) {
|
if (trims && trims.IsMap()) {
|
||||||
|
|||||||
@@ -65,8 +65,14 @@
|
|||||||
#if LV_MEM_ADR == 0
|
#if LV_MEM_ADR == 0
|
||||||
//#define LV_MEM_POOL_INCLUDE your_alloc_library /* Uncomment if using an external allocator*/
|
//#define LV_MEM_POOL_INCLUDE your_alloc_library /* Uncomment if using an external allocator*/
|
||||||
//#define LV_MEM_POOL_ALLOC your_alloc /* Uncomment if using an external allocator*/
|
//#define LV_MEM_POOL_ALLOC your_alloc /* Uncomment if using an external allocator*/
|
||||||
#define LV_MEM_POOL_INCLUDE <unistd.h>
|
#if defined(SIMU)
|
||||||
#define LV_MEM_POOL_ALLOC sbrk
|
// 'sbrk' does not exist on Windows :(
|
||||||
|
#define LV_MEM_POOL_INCLUDE <stdlib.h>
|
||||||
|
#define LV_MEM_POOL_ALLOC malloc
|
||||||
|
#else
|
||||||
|
#define LV_MEM_POOL_INCLUDE <unistd.h>
|
||||||
|
#define LV_MEM_POOL_ALLOC sbrk
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#else /*LV_MEM_CUSTOM*/
|
#else /*LV_MEM_CUSTOM*/
|
||||||
|
|||||||
Reference in New Issue
Block a user