grep for 'ftell' and look at the usage of its return value, such as in e.g. nBlockPosRet.
File offsets should be stored in [u]int64, not unsigned int.
The specific example is not strictly a bug, because we cap the size of our block chain data files before the 4GB barrier. However, re-use of this code for other files could lead to bugs and problems.
I agree, but I'm not sure it's worth the trouble to fix it.