diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/common/windows/pdb_source_line_writer.cc | 8 | ||||
-rw-r--r-- | src/tools/windows/symupload/symupload.cc | 2 |
2 files changed, 6 insertions, 4 deletions
diff --git a/src/common/windows/pdb_source_line_writer.cc b/src/common/windows/pdb_source_line_writer.cc index dba2ea76..1f24f70a 100644 --- a/src/common/windows/pdb_source_line_writer.cc +++ b/src/common/windows/pdb_source_line_writer.cc @@ -36,6 +36,8 @@ #include <ImageHlp.h> #include <stdio.h> +#include <limits> + #include "common/windows/dia_util.h" #include "common/windows/guid_string.h" #include "common/windows/string_utils-inl.h" @@ -390,10 +392,10 @@ bool PDBSourceLineWriter::PrintFrameData() { if (!FindTable(session_, &frame_data_enum)) return false; - DWORD last_type = -1; - DWORD last_rva = -1; + DWORD last_type = std::numeric_limits<DWORD>::max() + DWORD last_rva = std::numeric_limits<DWORD>::max() DWORD last_code_size = 0; - DWORD last_prolog_size = -1; + DWORD last_prolog_size = std::numeric_limits<DWORD>::max() CComPtr<IDiaFrameData> frame_data; ULONG count = 0; diff --git a/src/tools/windows/symupload/symupload.cc b/src/tools/windows/symupload/symupload.cc index b858a63d..c9d624e8 100644 --- a/src/tools/windows/symupload/symupload.cc +++ b/src/tools/windows/symupload/symupload.cc @@ -153,7 +153,7 @@ static bool DumpSymbolsToTempFile(const wchar_t *file, return writer.GetModuleInfo(pdb_info); } -void printUsageAndExit() { +__declspec(noreturn) void printUsageAndExit() { wprintf(L"Usage: symupload [--timeout NN] <file.exe|file.dll> <symbol upload URL>\n\n"); wprintf(L"Timeout is in milliseconds, or can be 0 to be unlimited\n\n"); wprintf(L"Example:\n\n\tsymupload.exe --timeout 0 chrome.dll http://no.free.symbol.server.for.you\n"); |