diff options
author | mmoss@google.com <mmoss@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-09-29 21:39:01 +0000 |
---|---|---|
committer | mmoss@google.com <mmoss@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-09-29 21:39:01 +0000 |
commit | aa4edea0dcdec0733c01e3f2c7487969d17b4a51 (patch) | |
tree | 29429e6be89e9b8868f2e981042efe8098be5582 /chrome | |
parent | 38fdd0838e47fa81cd9abb7ec622d61a28998af8 (diff) | |
download | chromium_src-aa4edea0dcdec0733c01e3f2c7487969d17b4a51.zip chromium_src-aa4edea0dcdec0733c01e3f2c7487969d17b4a51.tar.gz chromium_src-aa4edea0dcdec0733c01e3f2c7487969d17b4a51.tar.bz2 |
Some cleanups for gcc warnings:
test/chrome_plugin/test_chrome_plugin.cc:26: warning: comparison between signed and unsigned integer expressions
test/chrome_plugin/test_chrome_plugin.cc:73: warning: 'ResponseStream::request_' will be initialized after
test/chrome_plugin/test_chrome_plugin.cc:72: warning: 'int ResponseStream::ready_state_'
test/chrome_plugin/test_chrome_plugin.cc:77: warning: when initialized here
test/chrome_plugin/test_chrome_plugin.cc:105: warning: unused variable 'status'
Review URL: http://codereview.chromium.org/5034
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2694 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/test/chrome_plugin/test_chrome_plugin.cc | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/chrome/test/chrome_plugin/test_chrome_plugin.cc b/chrome/test/chrome_plugin/test_chrome_plugin.cc index 5e3c532..7343205 100644 --- a/chrome/test/chrome_plugin/test_chrome_plugin.cc +++ b/chrome/test/chrome_plugin/test_chrome_plugin.cc @@ -23,7 +23,7 @@ static TestFuncParams::BrowserFuncs g_cptest_funcs; static base::AtExitManager global_at_exit_manager; const TestResponsePayload* FindPayload(const char* url) { - for (int i = 0; i < arraysize(kChromeTestPluginPayloads); ++i) { + for (size_t i = 0; i < arraysize(kChromeTestPluginPayloads); ++i) { if (strcmp(kChromeTestPluginPayloads[i].url, url) == 0) return &kChromeTestPluginPayloads[i]; } @@ -75,8 +75,8 @@ private: ResponseStream::ResponseStream(const TestResponsePayload* payload, CPRequest* request) - : payload_(payload), offset_(0), request_(request), - ready_state_(READY_INVALID) { + : payload_(payload), offset_(0), ready_state_(READY_INVALID), + request_(request) { } void ResponseStream::Init() { @@ -101,10 +101,8 @@ int ResponseStream::GetResponseInfo(CPResponseInfoType type, void* buf, switch (type) { case CPRESPONSEINFO_HTTP_STATUS: - if (buf) { - int status = payload_->status; + if (buf) memcpy(buf, &payload_->status, buf_size); - } break; case CPRESPONSEINFO_HTTP_RAW_HEADERS: { std::string headers = GetPayloadHeaders(payload_); @@ -380,4 +378,3 @@ int STDCALL CP_Test(void* vparam) { g_cptest_funcs = param->bfuncs; return CPERR_SUCCESS; } - |