Skip to content

Commit

Permalink
chore: address compile-time warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
YorkWaugh authored and Bush2021 committed May 10, 2024
1 parent 8514387 commit ca4a491
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ std::wstring GetIniString(const std::wstring& section,
std::vector<TCHAR> buffer(100);
DWORD bytesread = 0;
do {
bytesread = ::GetPrivateProfileStringW(section.c_str(), key.c_str(),
default_value.c_str(), buffer.data(),
buffer.size(), kIniPath.c_str());
bytesread = ::GetPrivateProfileStringW(
section.c_str(), key.c_str(), default_value.c_str(), buffer.data(),
(DWORD)buffer.size(), kIniPath.c_str());
// 如果字符串过长,则倍增缓冲区大小
if (bytesread >= buffer.size() - 1) {
buffer.resize(buffer.size() * 2);
Expand Down
2 changes: 1 addition & 1 deletion src/fastsearch.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ static const uint8_t* SundaySearch(const uint8_t* s,
}
}

i += skip[s[i + m]];
i += (int)skip[s[i + m]];
}

return NULL;
Expand Down
4 changes: 4 additions & 0 deletions src/green.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,15 @@ NET_API_STATUS WINAPI MyNetUserGetInfo(LPCWSTR servername,
return ret;
}

#ifndef PROCESS_CREATION_MITIGATION_POLICY_BLOCK_NON_MICROSOFT_BINARIES_ALWAYS_ON
#define PROCESS_CREATION_MITIGATION_POLICY_BLOCK_NON_MICROSOFT_BINARIES_ALWAYS_ON \
(0x00000001ui64 << 44)
#endif

#ifndef PROCESS_CREATION_MITIGATION_POLICY_WIN32K_SYSTEM_CALL_DISABLE_ALWAYS_ON
#define PROCESS_CREATION_MITIGATION_POLICY_WIN32K_SYSTEM_CALL_DISABLE_ALWAYS_ON \
(0x00000001ui64 << 28)
#endif

typedef BOOL(WINAPI* pUpdateProcThreadAttribute)(
LPPROC_THREAD_ATTRIBUTE_LIST lpAttributeList,
Expand Down

0 comments on commit ca4a491

Please sign in to comment.