mcuboot icon indicating copy to clipboard operation
mcuboot copied to clipboard

Compilation error.

Open tito97sp opened this issue 2 years ago • 0 comments

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?

tito97sp avatar Sep 04 '23 12:09 tito97sp