Fixed some cases of violation of aliasing rules, as it might cause some undefined behavior and therefore may cause unexpected issues at some compilers (by doing that, we have also removed several warning messages.