mcuboot
mcuboot copied to clipboard
Compilation error.
Defect detected
_Static_assert defined in C11.
Error log
Compilation raises the following compilation error in this line:
https://github.com/mcu-tools/mcuboot/blob/main/boot/bootutil/include/bootutil/image.h#L163-L164
mcuboot/boot/bootutil/include/bootutil/image.h:163:15: error: expected constructor, destructor, or type conversion before '(' token
163 | _Static_assert(sizeof(struct image_header) == IMAGE_HEADER_SIZE,
| ^
compilation terminated due to -Wfatal-errors.
Proposed Fix
Following modification fixes the issue.
static_assert((sizeof(struct image_header)) == IMAGE_HEADER_SIZE,
"struct image_header not required size\n");
Change Log
Change added in this commit e3cbbece365d54514b1a909507820818a3125f3c
Comments
Please @d3zd3z can you check this?