>now how can subtracting two integers possibly cause integer overflow?
Under is over and over is under.

The point is that you could subtract beyond the limits of a signed integer, and Bad Things(TM) happen when you do stuff like that.
>But don't thumb you nose at nested conditional statements just
>because you may not understand them.
If everyone thumbed their noses at nested conditional statements, I wouldn't need to understand them. And the world would be a better place.
>I'm sertain you already know that the two parameters must be cast to the correct type.
And const is there for a reason. But for assignment there's no need to use casts:
int compare ( const void *a, const void *b )
{
const int *ia = a;
const int *ib = b;
if ( *ia < *ib )
return +1;
else if ( *ia > *ib )
return -1;
else
return 0;
}
When you go directly into a function call, a cast is a good idea, but remember that strcmp expects pointers to const char, not pointers to char. You don't cast to the actual type, you cast to the expected type and hope with all your might that the two types are compatible.