From 4a0f9bf0309c5d3a7c807dea36f0be36edbab682 Mon Sep 17 00:00:00 2001 From: "thestig@chromium.org" Date: Wed, 18 Dec 2013 22:43:56 +0000 Subject: Windows: Fix remaining level 4 warnings. R=mark@chromium.org Review URL: https://breakpad.appspot.com/954002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1267 4c0a9323-5329-0410-9bdc-e9ce6186880e --- src/common/windows/pdb_source_line_writer.cc | 8 +++++--- src/tools/windows/symupload/symupload.cc | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'src') 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 #include +#include + #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::max() + DWORD last_rva = std::numeric_limits::max() DWORD last_code_size = 0; - DWORD last_prolog_size = -1; + DWORD last_prolog_size = std::numeric_limits::max() CComPtr 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] \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"); -- cgit v1.2.1