// Turn PHDRs into flasher segments, checking for PHDR sanity and merging adjacent
// unaligned segments if needed
-static int build_segs_from_phdrs(flash_file_t *ctx, FILE *fd, Elf32_Phdr *phdrs, int num_phdrs)
+static int build_segs_from_phdrs(flash_file_t *ctx, FILE *fd, Elf32_Phdr *phdrs, uint16_t num_phdrs)
{
Elf32_Phdr *phdr = phdrs;
flash_seg_t *seg;
FILE *fd = NULL;
Elf32_Ehdr ehdr;
Elf32_Phdr *phdrs = NULL;
- int num_phdrs;
+ uint16_t num_phdrs;
int res;
fd = fopen(name, "rb");
// Get the state of the proxmark, backwards compatible
static int get_proxmark_state(uint32_t *state)
{
- UsbCommand c;
+ UsbCommand c = {0};
c.cmd = CMD_DEVICE_INFO;
SendCommand(&c);
UsbCommand resp;