From cddcd7483a7c472598af098e759e5d309024f606 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 26 Dec 2021 20:31:39 +0300 Subject: DWORD -> uint32_t --- plugins/CryptoPP/crypto/src/fipstest.cpp | 4 ++-- plugins/CryptoPP/crypto/src/hrtimer.cpp | 2 +- plugins/CryptoPP/crypto/src/osrng.cpp | 2 +- plugins/CryptoPP/crypto/src/wait.cpp | 10 +++++----- plugins/CryptoPP/crypto/src/winpipes.cpp | 6 +++--- 5 files changed, 12 insertions(+), 12 deletions(-) (limited to 'plugins/CryptoPP/crypto/src') diff --git a/plugins/CryptoPP/crypto/src/fipstest.cpp b/plugins/CryptoPP/crypto/src/fipstest.cpp index d65730b010..685dd1e841 100644 --- a/plugins/CryptoPP/crypto/src/fipstest.cpp +++ b/plugins/CryptoPP/crypto/src/fipstest.cpp @@ -318,7 +318,7 @@ bool IntegrityCheckModule(const char *moduleFilename, const byte *expectedModule const IMAGE_DOS_HEADER *ph = (IMAGE_DOS_HEADER *)memBase; const IMAGE_NT_HEADERS *phnt = (IMAGE_NT_HEADERS *)(memBase + ph->e_lfanew); const IMAGE_SECTION_HEADER *phs = IMAGE_FIRST_SECTION(phnt); - DWORD nSections = phnt->FileHeader.NumberOfSections; + uint32_t nSections = phnt->FileHeader.NumberOfSections; size_t currentFilePos = 0; size_t checksumPos = (byte *)&phnt->OptionalHeader.CheckSum - memBase; @@ -599,7 +599,7 @@ NAMESPACE_END // DllMain needs to be in the global namespace BOOL APIENTRY DllMain(HANDLE hModule, - DWORD ul_reason_for_call, + uint32_t ul_reason_for_call, LPVOID lpReserved) { if (ul_reason_for_call == DLL_PROCESS_ATTACH) diff --git a/plugins/CryptoPP/crypto/src/hrtimer.cpp b/plugins/CryptoPP/crypto/src/hrtimer.cpp index 4a1cc79ec5..029a6e7fd9 100644 --- a/plugins/CryptoPP/crypto/src/hrtimer.cpp +++ b/plugins/CryptoPP/crypto/src/hrtimer.cpp @@ -103,7 +103,7 @@ TimerWord ThreadUserTimer::GetCurrentTimerValue() FILETIME now, ignored; if (!GetThreadTimes(GetCurrentThread(), &ignored, &ignored, &ignored, &now)) { - DWORD lastError = GetLastError(); + uint32_t lastError = GetLastError(); if (lastError == ERROR_CALL_NOT_IMPLEMENTED) { getCurrentThreadImplemented = false; diff --git a/plugins/CryptoPP/crypto/src/osrng.cpp b/plugins/CryptoPP/crypto/src/osrng.cpp index 22f13e65d1..c841abf02c 100644 --- a/plugins/CryptoPP/crypto/src/osrng.cpp +++ b/plugins/CryptoPP/crypto/src/osrng.cpp @@ -77,7 +77,7 @@ void NonblockingRng::GenerateBlock(byte *output, size_t size) # ifdef WORKAROUND_MS_BUG_Q258000 const MicrosoftCryptoProvider &m_Provider = Singleton().Ref(); # endif - if (!CryptGenRandom(m_Provider.GetProviderHandle(), (DWORD)size, output)) + if (!CryptGenRandom(m_Provider.GetProviderHandle(), (uint32_t)size, output)) throw OS_RNG_Err("CryptGenRandom"); #else if (read(m_fd, output, size) != size) diff --git a/plugins/CryptoPP/crypto/src/wait.cpp b/plugins/CryptoPP/crypto/src/wait.cpp index b031922638..aabdc21dc8 100644 --- a/plugins/CryptoPP/crypto/src/wait.cpp +++ b/plugins/CryptoPP/crypto/src/wait.cpp @@ -105,7 +105,7 @@ struct WaitingThreadData unsigned int count; HANDLE threadHandle; DWORD threadId; - DWORD* error; + DWORD *error; }; WaitObjectContainer::~WaitObjectContainer() @@ -125,7 +125,7 @@ WaitObjectContainer::~WaitObjectContainer() threadHandles[i] = thread.threadHandle; } PulseEvent(m_startWaiting); - ::WaitForMultipleObjects((DWORD)m_threads.size(), threadHandles, TRUE, INFINITE); + ::WaitForMultipleObjects((uint32_t)m_threads.size(), threadHandles, TRUE, INFINITE); for (i=0; i 0) { diff --git a/plugins/CryptoPP/crypto/src/winpipes.cpp b/plugins/CryptoPP/crypto/src/winpipes.cpp index ea9843973b..e9c6d501ed 100644 --- a/plugins/CryptoPP/crypto/src/winpipes.cpp +++ b/plugins/CryptoPP/crypto/src/winpipes.cpp @@ -65,7 +65,7 @@ void WindowsHandle::CloseHandle() void WindowsPipe::HandleError(const char *operation) const { - DWORD err = GetLastError(); + uint32_t err = GetLastError(); throw Err(GetHandle(), operation, err); } @@ -92,7 +92,7 @@ bool WindowsPipeReceiver::Receive(byte* buf, size_t bufLen) HANDLE h = GetHandle(); // don't queue too much at once, or we might use up non-paged memory - if (ReadFile(h, buf, UnsignedMin((DWORD)128*1024, bufLen), &m_lastResult, &m_overlapped)) + if (ReadFile(h, buf, UnsignedMin((uint32_t)128*1024, bufLen), &m_lastResult, &m_overlapped)) { if (m_lastResult == 0) m_eofReceived = true; @@ -166,7 +166,7 @@ void WindowsPipeSender::Send(const byte* buf, size_t bufLen) DWORD written = 0; HANDLE h = GetHandle(); // don't queue too much at once, or we might use up non-paged memory - if (WriteFile(h, buf, UnsignedMin((DWORD)128*1024, bufLen), &written, &m_overlapped)) + if (WriteFile(h, buf, UnsignedMin((uint32_t)128*1024, bufLen), &written, &m_overlapped)) { m_resultPending = false; m_lastResult = written; -- cgit v1.2.3