Switch to using the correct intptr_t type use where a pointer must be cast to an integer type.

This commit is contained in:
Dean Camera 2010-05-26 12:24:44 +00:00
parent 670413603f
commit 54e69dbee1
5 changed files with 14 additions and 14 deletions

View file

@ -233,7 +233,7 @@ static void ReadWriteMemoryBlock(const uint8_t Command)
else
{
/* Read the next EEPROM byte into the endpoint */
WriteNextResponseByte(eeprom_read_byte((uint8_t*)(uint16_t)(CurrAddress >> 1)));
WriteNextResponseByte(eeprom_read_byte((uint8_t*)(intptr_t)(CurrAddress >> 1)));
/* Increment the address counter after use */
CurrAddress += 2;
@ -275,7 +275,7 @@ static void ReadWriteMemoryBlock(const uint8_t Command)
else
{
/* Write the next EEPROM byte from the endpoint */
eeprom_write_byte((uint8_t*)(uint16_t)(CurrAddress >> 1), FetchNextCommandByte());
eeprom_write_byte((uint8_t*)((intptr_t)(CurrAddress >> 1)), FetchNextCommandByte());
/* Increment the address counter after use */
CurrAddress += 2;
@ -513,7 +513,7 @@ void CDC_Task(void)
else if (Command == 'D')
{
/* Read the byte from the endpoint and write it to the EEPROM */
eeprom_write_byte((uint8_t*)((uint16_t)(CurrAddress >> 1)), FetchNextCommandByte());
eeprom_write_byte((uint8_t*)((intptr_t)(CurrAddress >> 1)), FetchNextCommandByte());
/* Increment the address after use */
CurrAddress += 2;
@ -524,7 +524,7 @@ void CDC_Task(void)
else if (Command == 'd')
{
/* Read the EEPROM byte and write it to the endpoint */
WriteNextResponseByte(eeprom_read_byte((uint8_t*)((uint16_t)(CurrAddress >> 1))));
WriteNextResponseByte(eeprom_read_byte((uint8_t*)((intptr_t)(CurrAddress >> 1))));
/* Increment the address after use */
CurrAddress += 2;