Skip to content

Commit

Permalink
msvc fix attempt 1
Browse files Browse the repository at this point in the history
  • Loading branch information
kernelwernel committed Oct 24, 2023
1 parent 7e2521b commit b75b5ea
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/vmaware.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -487,9 +487,7 @@ struct VM {
* return false;
* }
*/
#if (MSVC)
__declspec(noalias) __declspec(restrict)
#elif (LINUX)
#if (LINUX && __has_cpp_attribute(gnu::pure))
[[gnu::pure]]
#endif
[[nodiscard]] static inline bool disabled(const u64 p_flag) noexcept {
Expand Down Expand Up @@ -1897,10 +1895,10 @@ struct VM {
return false;
}

HKEY hKey = 0;
HKEY hKey;
char buf[0xFF] = {0};
DWORD dwBufSize = sizeof(buf);
const bool result = (RegOpenKeyEx(TEXT("SOFTWARE\\VMware, Inc.\\VMware Tools"), 0, KEY_QUERY_VALUE, &hKey) == ERROR_SUCCESS);
bool result = (RegOpenKeyEx("SOFTWARE\\VMware, Inc.\\VMware Tools"), 0, KEY_QUERY_VALUE, &hKey) == ERROR_SUCCESS);

#ifdef __VMAWARE_DEBUG__
debug("VMWARE_REG: result = ", result);
Expand Down

0 comments on commit b75b5ea

Please sign in to comment.