From: Wilhansen Li Date: Mon, 26 Dec 2016 13:20:50 +0000 (+0800) Subject: Make dtbTool compile in < C99. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=bcf770e5ce4cddf078e7c7297cd29ca6a4e67cea;p=GitHub%2FLineageOS%2FG12%2Fandroid_hardware_amlogic_tools_dtbtool.git Make dtbTool compile in < C99. --- diff --git a/dtbTool.c b/dtbTool.c index 38c2c0b..db99bc8 100644 --- a/dtbTool.c +++ b/dtbTool.c @@ -460,10 +460,11 @@ int main(int argc, char **argv) for (chip = chip_list; chip; chip = chip->next) { /* for some reason, the id entries are flipped. */ { + int i; uint32_t *u32chipset = (uint32_t*)chip->chipset, *u32platform = (uint32_t*)chip->platform, *u32revNum = (uint32_t*)chip->revNum; - for ( int i = 0; i < INFO_ENTRY_SIZE/sizeof(uint32_t); ++i ) { + for ( i = 0; i < INFO_ENTRY_SIZE/sizeof(uint32_t); ++i ) { *(u32chipset + i) = swap_bytes_u32(*(u32chipset + i)); *(u32platform + i) = swap_bytes_u32(*(u32platform + i)); *(u32revNum + i) = swap_bytes_u32(*(u32revNum + i));