AP_Mount: use zero length flexible arrays in unions

This commit is contained in:
Andrew Tridgell 2016-05-25 11:15:21 +10:00
parent af116d238f
commit ac8c4d9beb
2 changed files with 2 additions and 2 deletions

View File

@ -288,7 +288,7 @@ private:
alexmos_angles angles;
alexmos_params params;
alexmos_angles_speed angle_speed;
uint8_t bytes[1];
uint8_t bytes[0];
} _buffer,_current_parameters;
AP_HAL::UARTDriver *_port;

View File

@ -145,7 +145,7 @@ private:
union PACKED SToRM32_reply {
SToRM32_reply_data_struct data;
SToRM32_reply_ack_struct ack;
uint8_t bytes[1];
uint8_t bytes[0];
} _buffer;
// keep the last _current_angle values