|
From: <du...@ma...> - 2009-06-21 05:20:39
|
Author: duane
Date: 2009-06-21 05:20:35 +0200 (Sun, 21 Jun 2009)
New Revision: 2337
Modified:
trunk/src/flash/avrf.c
Log:
C99 printf() -Werror fixes
Modified: trunk/src/flash/avrf.c
===================================================================
--- trunk/src/flash/avrf.c 2009-06-21 03:20:31 UTC (rev 2336)
+++ trunk/src/flash/avrf.c 2009-06-21 03:20:35 UTC (rev 2337)
@@ -155,7 +155,7 @@
{
return ERROR_FAIL;
}
- LOG_DEBUG("poll_value = 0x%04X", poll_value);
+ LOG_DEBUG("poll_value = 0x%04" PRIx32 "", poll_value);
}while(!(poll_value & 0x0200));
return ERROR_OK;
@@ -202,7 +202,7 @@
{
return ERROR_FAIL;
}
- LOG_DEBUG("poll_value = 0x%04X", poll_value);
+ LOG_DEBUG("poll_value = 0x%04" PRIx32 "", poll_value);
}while(!(poll_value & 0x0200));
return ERROR_OK;
@@ -264,12 +264,12 @@
page_size = bank->sectors[0].size;
if ((offset % page_size) != 0)
{
- LOG_WARNING("offset 0x%x breaks required %d-byte alignment", offset, page_size);
+ LOG_WARNING("offset 0x%" PRIx32 " breaks required %" PRIu32 "-byte alignment", offset, page_size);
return ERROR_FLASH_DST_BREAKS_ALIGNMENT;
}
- LOG_DEBUG("offset is 0x%08X", offset);
- LOG_DEBUG("count is %d", count);
+ LOG_DEBUG("offset is 0x%08" PRIx32 "", offset);
+ LOG_DEBUG("count is %" PRId32 "", count);
if (ERROR_OK != avr_jtagprg_enterprogmode(avr))
{
@@ -323,10 +323,10 @@
return ERROR_FAIL;
}
- LOG_INFO( "device id = 0x%08x", device_id );
+ LOG_INFO( "device id = 0x%08" PRIx32 "", device_id );
if (EXTRACT_MFG(device_id) != 0x1F)
{
- LOG_ERROR("0x%X is invalid Manufacturer for avr, 0x%X is expected", EXTRACT_MFG(device_id), 0x1F);
+ LOG_ERROR("0x%" PRIx32 " is invalid Manufacturer for avr, 0x%X is expected", EXTRACT_MFG(device_id), 0x1F);
}
for (i = 0; i < (int)(sizeof(avft_chips_info) / sizeof(avft_chips_info[0])); i++)
@@ -361,7 +361,7 @@
else
{
// chip not supported
- LOG_ERROR("0x%X is not support for avr", EXTRACT_PART(device_id));
+ LOG_ERROR("0x%" PRIx32 " is not support for avr", EXTRACT_PART(device_id));
avrf_info->probed = 1;
return ERROR_FAIL;
@@ -402,10 +402,10 @@
return ERROR_FAIL;
}
- LOG_INFO( "device id = 0x%08x", device_id );
+ LOG_INFO( "device id = 0x%08" PRIx32 "", device_id );
if (EXTRACT_MFG(device_id) != 0x1F)
{
- LOG_ERROR("0x%X is invalid Manufacturer for avr, 0x%X is expected", EXTRACT_MFG(device_id), 0x1F);
+ LOG_ERROR("0x%" PRIx32 " is invalid Manufacturer for avr, 0x%X is expected", EXTRACT_MFG(device_id), 0x1F);
}
for (i = 0; i < (int)(sizeof(avft_chips_info) / sizeof(avft_chips_info[0])); i++)
@@ -422,7 +422,7 @@
if (avr_info != NULL)
{
// chip found
- snprintf(buf, buf_size, "%s - Rev: 0x%X", avr_info->name, EXTRACT_VER(device_id));
+ snprintf(buf, buf_size, "%s - Rev: 0x%" PRIx32 "", avr_info->name, EXTRACT_VER(device_id));
return ERROR_OK;
}
else
|