F
Fred K
The Xpm pixmap library contains code that casts an unsigned int
to a (void *), passing that as an argument to a function
that expects a (void *):
/* Function prototype: */
xpmHashIntern (xpmHashTable *table, char *tag, void *data));
/* Calling it, casting 3rd argument: */
int a = <something>;
xpmHashIntern(hashtable, color->string, (void *)a );
On a 64-bit platform where pointers are 64 bits and ints
are 32 bits, is this safe?
to a (void *), passing that as an argument to a function
that expects a (void *):
/* Function prototype: */
xpmHashIntern (xpmHashTable *table, char *tag, void *data));
/* Calling it, casting 3rd argument: */
int a = <something>;
xpmHashIntern(hashtable, color->string, (void *)a );
On a 64-bit platform where pointers are 64 bits and ints
are 32 bits, is this safe?