TauLabs/TauLabs — pull request #690 by lilvinz (2013-06-26 09:04:19+00:00)
Title: UAVO enum size fix

Based on a very detailed explanation from @solidgoldbomb, this is intended to properly fix usage of uninitialized memory in conjunction with UAVO enums:

> This addresses a very subtle bug identified by lilvinz when the
> UAVO's enum types were used outside of the UAVO's data struct,
> such as a global var or stack var.
>
> The enums *inside* the UAVO data struct are packed so they occupy the
> minimum number of bytes required to hold all of the enum values. The
> size of the enums when used as a variable are the arch's word size (ie.
> not packed).
>
> This discrepancy is due to a missing __attribute__((packed)) on the
> enum definitions *outside* of the UAVO data struct.
>
> This patch provides the missing packed attribute to the enum definitions.