clean up cast alignment warnings by reinterpret_cast'ing the pointers to the appropriate type