dfu: Fix build issue with gcc8
We get the following warning when buiding with gcc8: error: 'packed' attribute ignored for type 'u32_t *' {aka 'unsigned int *'} [-Werror=attributes] Use UNALIGNED_GET() to access the data since we don't know the alignment. Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit is contained in:
parent
3c44137447
commit
93d0f8c58d
1 changed files with 1 additions and 1 deletions
|
@ -42,7 +42,7 @@ static bool flash_verify(struct device *dev, off_t offset,
|
|||
if (memcmp(data, &temp, size)) {
|
||||
LOG_ERR("offset=0x%08"PRIx32" VERIFY FAIL. "
|
||||
"expected: 0x%08x, actual: 0x%08x",
|
||||
(u32_t)offset, temp, *(__packed u32_t*)data);
|
||||
(u32_t)offset, temp, UNALIGNED_GET(data));
|
||||
break;
|
||||
}
|
||||
len -= size;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue