mirror of
https://github.com/yuzu-emu/breakpad.git
synced 2024-11-28 04:04:20 +01:00
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
This commit is contained in:
parent
bec07f6972
commit
2a4698319a
@ -46,8 +46,8 @@
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
WarningLevel="4"
|
||||
Detect64BitPortabilityProblems="false"
|
||||
DebugInformationFormat="4"
|
||||
/>
|
||||
<Tool
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user