ARM11: remove needless string format #ifdeffery

We don't need to use size_t in these places; so it's easy
to be rid of the need for this #ifdef and its MS-derived
portability problems.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
This commit is contained in:
David Brownell
2009-11-22 10:21:22 -08:00
parent 1c619a2f12
commit fa618cc74d
3 changed files with 22 additions and 21 deletions

View File

@@ -588,12 +588,13 @@ int arm11_run_instr_data_to_core_noack(struct arm11_common * arm11, uint32_t opc
arm11_setup_field(arm11, 1, NULL, NULL, chain5_fields + 2);
uint8_t *Readies;
size_t readiesNum = (count + 1);
size_t bytes = sizeof(*Readies)*readiesNum;
unsigned readiesNum = count + 1;
unsigned bytes = sizeof(*Readies)*readiesNum;
Readies = (uint8_t *) malloc(bytes);
if (Readies == NULL)
{
LOG_ERROR("Out of memory allocating " ZU " bytes", bytes);
LOG_ERROR("Out of memory allocating %u bytes", bytes);
return ERROR_FAIL;
}
@@ -626,7 +627,7 @@ int arm11_run_instr_data_to_core_noack(struct arm11_common * arm11, uint32_t opc
int retval = jtag_execute_queue();
if (retval == ERROR_OK)
{
size_t error_count = 0;
unsigned error_count = 0;
for (size_t i = 0; i < readiesNum; i++)
{
@@ -637,7 +638,8 @@ int arm11_run_instr_data_to_core_noack(struct arm11_common * arm11, uint32_t opc
}
if (error_count > 0 )
LOG_ERROR(ZU " words out of " ZU " not transferred", error_count, readiesNum);
LOG_ERROR("%u words out of %u not transferred",
error_count, readiesNum);
}