lvalue required as increment operand compile error
Code:
int
read_itr_seq(void *buf, int itype, FILE *f)
{
int l, ch;
void *p = buf ;
if ( itype < 7 || (itype > 13 && itype != 20) ) return -2 ;
l = (ch = getc(f)) ;
if ( l == 0 ) {
while ( (ch = getc(f)) == 0 ) ;
ch = getc(f) ; /* Second byte of chunk word */
l = (ch = getc(f)) ;
}
else if ( ch == 0xff ) return 0 ;
*((u_char *)p)++ = l ;
if ( itype < 11 || itype == 20 ) fread(p, (size_t)(l + 22), (size_t)1, f) ;
else fread(p, (size_t)(l + 23), (size_t)1, f) ;
if ( ferror(f) ) return -1 ;
return 1 ;
}
Code:
*((u_char *)p)++ = l ;
has the compile error lvalue required as increment operand, I am using GCC4.3.3 and this code works under GCC 2.96, would someone give me a hint on this? Thanks