Here is one for people to scratch their head on:
unsigned char ucObject[255];
memset(ucPrtLine,0,sizeof(ucPrtLine));
sfb = fiInp->afpRec.sfbPtr;
memset(ucObject,0,sizeof(ucObject));
strcpy((PCHAR) ucObject,(PCHAR) fiInp->ucOName);
if (ucObject[0] == '\xff') {
strcpy((PCHAR) ucObject,"(NULL)");
}
gcc was coming up with test ignored because there could only be one
answer until I set the compile option to -funsigned-char. Anyone know
what is wrong with this, as far as I can see '\xff' is a valid test
aginst unsigned char.
According to what I know of the C rules:
a) 'x\ff' is implicitly an integer.
b) unsigned char is implicitly promoted to int and 0xff is a valid
value.
Ken
--
SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
More Info: http://slug.org.au/lists/listinfo/slug