mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2026-05-12 11:18:11 -07:00
Fix clang warnings on increasing alignment requirements
This commit is contained in:
@@ -406,7 +406,8 @@ static void init_bitflip_bitarrays(void) {
|
||||
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) {
|
||||
uint32_t *bitset = (uint32_t *)malloc_bitarray(sizeof(uint32_t) * (1 << 19));
|
||||
|
||||
+2
-1
@@ -350,7 +350,8 @@ int flash_load(flash_file_t *ctx, bool force) {
|
||||
}
|
||||
|
||||
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)) {
|
||||
offset -= le32(shdrs[i].sh_addr);
|
||||
if (offset < le32(shdrs[i].sh_size)) {
|
||||
|
||||
Reference in New Issue
Block a user