View Single Post
  #1   Spotlight this post!  
Unread 28-01-2007, 13:14
htwiz2002's Avatar
htwiz2002 htwiz2002 is offline
Htwizard
AKA: Anthony Takata Bawahawba
#1290
Team Role: Engineer
 
Join Date: Jan 2004
Location: Chandler, AZ
Posts: 23
htwiz2002 will become famous soon enough
Exclamation Pointers/References?

I'm trying to write a function that reads values from eeprom and stores their values into variables passed into the function. This is what it looks like:


Code:
void Terminal_eepromreadset(unsigned char set, unsigned char *data1, unsigned char *data2, unsigned char *data3, unsigned char *data4)
{
    //Consolidate this on verify that it works!!!
    unsigned int address = set * 4 -1;
    //*data1 = EEPROM_Read(address + 1);
    //*data2 = EEPROM_Read(address + 2);
    //*data3 = EEPROM_Read(address + 3);
    //*data4 = EEPROM_Read(address + 4);
}
...
// later on in another function this is how it's called:
unsigned char version1;
unsigned char version2;
unsigned char version3
unsigned char version4;
Terminal_eepromreadset(0, version1, version2, version3, version4); break;
version1 - version 4 are all inited with 0.
For some reason I get the following warnings when I compile:
Code:
C:\frc\FrcCode_2007_8722\terminal.c:550:Warning [2054] suspicious pointer conversion
C:\frc\FrcCode_2007_8722\terminal.c:550:Warning [2054] suspicious pointer conversion
C:\frc\FrcCode_2007_8722\terminal.c:550:Warning [2054] suspicious pointer conversion
C:\frc\FrcCode_2007_8722\terminal.c:550:Warning [2054] suspicious pointer conversion
line 550 is the call to the function. If i comment it out, everything is okay. But i want the function to work!

Any ideas?
__________________
TsAuKpAeTrA (Anthony)