diff --git a/bootinfo.c b/bootinfo.c index ea7d5e3..93b94d7 100644 --- a/bootinfo.c +++ b/bootinfo.c @@ -198,7 +198,7 @@ void print_boot_file_head(boot_file_head_t *hdr) void print_boot_dram_para(boot_dram_para_t *dram) { - pprintf(&dram->dram_baseaddr, "DRAM base : %p\n", (void *)(long)dram->dram_baseaddr); + pprintf(&dram->dram_baseaddr, "DRAM base : %p\n", (void *)(uintptr_t)dram->dram_baseaddr); pprintf(&dram->dram_clk, "DRAM clk : %d\n", dram->dram_clk); pprintf(&dram->dram_type, "DRAM type : %d\n", dram->dram_type); pprintf(&dram->dram_rank_num, "DRAM rank : %d\n", dram->dram_rank_num); diff --git a/fel.c b/fel.c index 5d8a382..6d9cfc6 100644 --- a/fel.c +++ b/fel.c @@ -325,7 +325,7 @@ void hexdump(void *data, uint32_t offset, size_t size) unsigned char *buf = data; for (j = 0; j < size; j+=16) { size_t i; - printf("%08lx: ",(long int)offset + j); + printf("%08zx: ", offset + j); for (i = 0; i < 16; i++) { if (j + i < size) printf("%02x ", buf[j+i]); diff --git a/nand-image-builder.c b/nand-image-builder.c index db42690..964a142 100644 --- a/nand-image-builder.c +++ b/nand-image-builder.c @@ -257,7 +257,7 @@ static void encode_bch(struct bch_control *bch, const uint8_t *data, } /* process first unaligned data bytes */ - m = ((unsigned long)data) & 3; + m = ((uintptr_t)data) & 3; if (m) { mlen = (len < (4-m)) ? len : 4-m; encode_bch_unaligned(bch, data, mlen, bch->ecc_buf);