[OpenSmalltalk/opensmalltalk-vm] 9d52fe: Thu shalt not cast a FILETIME to unsigned __int64

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[OpenSmalltalk/opensmalltalk-vm] 9d52fe: Thu shalt not cast a FILETIME to unsigned __int64

Eliot Miranda-3
 
  Branch: refs/heads/Cog
  Home:   https://github.com/OpenSmalltalk/opensmalltalk-vm
  Commit: 9d52fef2240b7bdf6cfa1a7d6cf8c967220f0e85
      https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/9d52fef2240b7bdf6cfa1a7d6cf8c967220f0e85
  Author: Nicolas Cellier <[hidden email]>
  Date:   2020-03-29 (Sun, 29 Mar 2020)

  Changed paths:
    M platforms/win32/vm/sqWin32Heartbeat.c

  Log Message:
  -----------
  Thu shalt not cast a FILETIME to unsigned __int64

pointer aliasing apart, such cast is explicitly discouraged in MSDN https://docs.microsoft.com/en-us/windows/win32/api/minwinbase/ns-minwinbase-filetime

> Do not cast a pointer to a FILETIME structure to either a ULARGE_INTEGER* or __int64* value because it can cause alignment faults on 64-bit Windows.