mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-20 13:23:51 -07:00
Fix clang warnings on increasing alignment requirements
This commit is contained in:
parent
d74e264250
commit
d97f417ee6
2 changed files with 4 additions and 2 deletions
|
@ -406,7 +406,8 @@ static void init_bitflip_bitarrays(void) {
|
||||||
exit(5);
|
exit(5);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t count = ((uint32_t *)uncompressed_data)[0];
|
uint32_t count;
|
||||||
|
memcpy(&count, uncompressed_data, sizeof(uint32_t));
|
||||||
|
|
||||||
if ((float)count / (1 << 24) < IGNORE_BITFLIP_THRESHOLD) {
|
if ((float)count / (1 << 24) < IGNORE_BITFLIP_THRESHOLD) {
|
||||||
uint32_t *bitset = (uint32_t *)malloc_bitarray(sizeof(uint32_t) * (1 << 19));
|
uint32_t *bitset = (uint32_t *)malloc_bitarray(sizeof(uint32_t) * (1 << 19));
|
||||||
|
|
|
@ -350,7 +350,8 @@ int flash_load(flash_file_t *ctx, bool force) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcmp(((char *)shstr) + shdrs[i].sh_name, ".bootphase1") == 0) {
|
if (strcmp(((char *)shstr) + shdrs[i].sh_name, ".bootphase1") == 0) {
|
||||||
uint32_t offset = *(uint32_t *)(ctx->elf + le32(shdrs[i].sh_offset) + le32(shdrs[i].sh_size) - 4);
|
uint32_t offset;
|
||||||
|
memcpy(&offset, ctx->elf + le32(shdrs[i].sh_offset) + le32(shdrs[i].sh_size) - 4, sizeof(uint32_t));
|
||||||
if (offset >= le32(shdrs[i].sh_addr)) {
|
if (offset >= le32(shdrs[i].sh_addr)) {
|
||||||
offset -= le32(shdrs[i].sh_addr);
|
offset -= le32(shdrs[i].sh_addr);
|
||||||
if (offset < le32(shdrs[i].sh_size)) {
|
if (offset < le32(shdrs[i].sh_size)) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue