The DP12 eeprom has an erase size of 4 bytes, and a write size of 2 bytes. This means that you have to erase a whole 4 bytes before writing, but once that is done you can write to the upper 2 and lower 2 bytes separately. This will not lead to the same sector getting written to twice. It is of course easiest to erase 4 and then write 4 at the same time, however.
"Possible loss of data" in Codewarrior means nothing, that warning is completely broken and irrational, as discussed plenty elsewhere on these forums. I consider it a compiler bug, you should disable it.
Word alignment you do manually. Each sector has to start at an address which is an even multiple of 4.
> data / 0x10000ul; what does this line do?
Apparently it divides data by 0x10000 or 65536 dec. The purpose is to mask out the hiword from the long. It does look odd however... on a dumb compiler, that line will be evaluated to division, making it needlessly ineffective.
An alternative would be:
hiword = (uint16_t) (data >> 16)
loword = (uint16_t) data;