I have come across a bit of code that uses sscanf. The function containing it is as follwos,
void f_extract_n(char *string, SINT *value, short *ind, int len )
memset(&tmp, 0, 30 );
strncpy( tmp, string, len );
if ( (sscanf(tmp, "%d", (unsigned int) value )) == EOF )
*ind = -1;
When run under AIX 4.3(32bit) it works fine (where value in tmp is "001108") but when run under AIX 5.2(64 bit) the sscanf is core dumping (same value of tmp). If I remove the (unsigned int) cast it works ok. Can anyone tell me why the (unsigned int) cast is causing the core dump?