Add warnings for unused results on functions calling realloc().

Improved patch for issue #11.