diff options
author | nealsid <nealsid@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2009-05-27 16:54:23 +0000 |
---|---|---|
committer | nealsid <nealsid@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2009-05-27 16:54:23 +0000 |
commit | 2a4698319ae9043b4479bf04381ad67c17922761 (patch) | |
tree | 6399af8be5c9b2520dc4948550ba82bd3e3f28ee /src | |
parent | Patch from Jeremy to have better error reporting, and workaround a Cocoa bug ... (diff) | |
download | breakpad-2a4698319ae9043b4479bf04381ad67c17922761.tar.xz |
Fix up warnings when building http_upload.cc. Changed warning level to /W4, and also turned off deprecated 64-bit compatability warning flag(since some people are regularly building Breakpad in 64-bit mode, if we turn off this flag we get rid of a warning in 32 bit mode under VS2008)
R=mmentovai
A=nealsid
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@340 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src')
-rw-r--r-- | src/client/windows/sender/crash_report_sender.vcproj | 4 | ||||
-rw-r--r-- | src/common/windows/http_upload.cc | 20 |
2 files changed, 13 insertions, 11 deletions
diff --git a/src/client/windows/sender/crash_report_sender.vcproj b/src/client/windows/sender/crash_report_sender.vcproj index 8c50b445..f3076a83 100644 --- a/src/client/windows/sender/crash_report_sender.vcproj +++ b/src/client/windows/sender/crash_report_sender.vcproj @@ -46,8 +46,8 @@ BasicRuntimeChecks="3" RuntimeLibrary="3" UsePrecompiledHeader="0" - WarningLevel="3" - Detect64BitPortabilityProblems="true" + WarningLevel="4" + Detect64BitPortabilityProblems="false" DebugInformationFormat="4" /> <Tool diff --git a/src/common/windows/http_upload.cc b/src/common/windows/http_upload.cc index 686c2ab5..65265723 100644 --- a/src/common/windows/http_upload.cc +++ b/src/common/windows/http_upload.cc @@ -30,7 +30,7 @@ #include <assert.h> // Disable exception handler warnings. -#pragma warning( disable : 4530 ) +#pragma warning( disable : 4530 ) #include <fstream> @@ -211,17 +211,19 @@ bool HTTPUpload::ReadResponse(HINTERNET request, wstring *response) { DWORD bytes_available; DWORD total_read = 0; - bool return_code; + BOOL return_code; + + while (((return_code = InternetQueryDataAvailable(request, &bytes_available, + 0, 0)) != 0) && bytes_available > 0) { - while ((return_code = InternetQueryDataAvailable(request, &bytes_available, - 0, 0) != 0) && - bytes_available > 0) { vector<char> response_buffer(bytes_available); DWORD size_read; - if ((return_code = InternetReadFile(request, &response_buffer[0], - bytes_available, &size_read) != 0) && - size_read > 0) { + return_code = InternetReadFile(request, + &response_buffer[0], + bytes_available, &size_read); + + if (return_code && size_read > 0) { total_read += size_read; response_body.append(&response_buffer[0], size_read); } else { @@ -333,7 +335,7 @@ void HTTPUpload::GetFileContents(const wstring &filename, #endif // _MSC_VER >= 1400 if (file.is_open()) { file.seekg(0, ios::end); - int length = file.tellg(); + std::streamoff length = file.tellg(); contents->resize(length); if (length != 0) { file.seekg(0, ios::beg); |