| ??? 03/29/99 06:03 Read: times |
#337 - C51 warning 196 |
I've a problem with a compiler warning (I'm not exactly understand the problem from the compiler) maybe you could help me?
* There is a file called file1.usr with: unsigned char i; unsigned int w; unsigned char k[5]; * A second file called file2.h looks like: typedef struct { unsigned char start[2]; #include file1.usr } EEPROM; EEPROM nvram; * Then there is a routine that writes a string to a location in an eeprom at the following way: nvwritestr (int location, unsigned char *destination, unsigned char length); * This routine will directly call the next one (by a define): _nvwritestr ((unsigned) &(((EEPROM *) -> location, unsigned char *destination, unsigned char length); * When I use in my program nvwritestr () as follows: nvwritestr (j[i], k[i], 2); with i is an unsigned char and j[] is an array of unsigned char (exactly as k[], see first point) then the compiler gives a warning 196 (mspace probably invalid). It's going about j[i]. Could somebody tell me what I am doing wrong? |



