summaryrefslogtreecommitdiffstats
path: root/webkit/glue
diff options
context:
space:
mode:
authortony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-21 20:12:56 +0000
committertony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-21 20:12:56 +0000
commitbe21555a228e74b1ad6f3314ae882cf21bc3c24e (patch)
tree3215603183ddb3b3acd62482b2b86bd3ef1daf27 /webkit/glue
parent4e3e9d70e14f80d41d7a1667430e6acbd561bd50 (diff)
downloadchromium_src-be21555a228e74b1ad6f3314ae882cf21bc3c24e.zip
chromium_src-be21555a228e74b1ad6f3314ae882cf21bc3c24e.tar.gz
chromium_src-be21555a228e74b1ad6f3314ae882cf21bc3c24e.tar.bz2
Enable compiler -Werror and -Wall on our webkit code for mac and linux.
This fixes some initialization order, removes unused varibles, and fixes a couple signed/unsigned comparison errors. Please check the signed/unsigned cases. We can't enable it for windows yet because MSVC complains about headers pulled in from WebCore. We'll have to wait until the API is upstreamed. BUG=21140 Review URL: http://codereview.chromium.org/214024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26728 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue')
-rw-r--r--webkit/glue/devtools/bound_object.cc4
-rw-r--r--webkit/glue/glue_serialize.cc4
-rw-r--r--webkit/glue/media/buffered_data_source.cc2
-rw-r--r--webkit/glue/media/simple_data_source.cc2
-rw-r--r--webkit/glue/plugins/webplugin_delegate_impl_gtk.cc4
-rw-r--r--webkit/glue/plugins/webplugin_delegate_impl_mac.mm12
-rw-r--r--webkit/glue/webplugin_impl.cc1
7 files changed, 15 insertions, 14 deletions
diff --git a/webkit/glue/devtools/bound_object.cc b/webkit/glue/devtools/bound_object.cc
index 3301bc2..4ffb2ca 100644
--- a/webkit/glue/devtools/bound_object.cc
+++ b/webkit/glue/devtools/bound_object.cc
@@ -13,8 +13,8 @@ BoundObject::BoundObject(
v8::Handle<v8::Context> context,
void* v8_this,
const char* object_name)
- : context_(context),
- object_name_(object_name) {
+ : object_name_(object_name),
+ context_(context) {
v8::HandleScope scope;
v8::Context::Scope context_scope(context);
v8_this_ = v8::Persistent<v8::External>::New(v8::External::New(v8_this));
diff --git a/webkit/glue/glue_serialize.cc b/webkit/glue/glue_serialize.cc
index 7ec7f81..e0f662da 100644
--- a/webkit/glue/glue_serialize.cc
+++ b/webkit/glue/glue_serialize.cc
@@ -104,7 +104,7 @@ inline double ReadReal(const SerializeObject* obj) {
const void* tmp;
int length = 0;
ReadData(obj, &tmp, &length);
- if (length > 0 && length >= sizeof(0.0))
+ if (length > 0 && length >= static_cast<int>(sizeof(0.0)))
return *static_cast<const double*>(tmp);
else
return 0.0;
@@ -319,7 +319,7 @@ static WebHistoryItem ReadHistoryItem(
// The extra referrer string is read for backwards compat.
const WebHTTPBody& http_body = ReadFormData(obj);
const WebString& http_content_type = ReadString(obj);
- const WebString& unused_referrer = ReadString(obj);
+ ALLOW_UNUSED const WebString& unused_referrer = ReadString(obj);
if (include_form_data) {
item.setHTTPBody(http_body);
item.setHTTPContentType(http_content_type);
diff --git a/webkit/glue/media/buffered_data_source.cc b/webkit/glue/media/buffered_data_source.cc
index 1267d59..87a203a 100644
--- a/webkit/glue/media/buffered_data_source.cc
+++ b/webkit/glue/media/buffered_data_source.cc
@@ -219,8 +219,6 @@ void BufferedResourceLoader::OnReceivedResponse(
return;
int64 first_byte_position = -1;
- int64 last_byte_position = -1;
- int64 instance_size = -1;
// The file:// protocol should be able to serve any request we want, so we
// take an exception for file protocol.
diff --git a/webkit/glue/media/simple_data_source.cc b/webkit/glue/media/simple_data_source.cc
index bcbec57..b2b9f32 100644
--- a/webkit/glue/media/simple_data_source.cc
+++ b/webkit/glue/media/simple_data_source.cc
@@ -143,7 +143,7 @@ void SimpleDataSource::OnCompletedRequest(const URLRequestStatus& status,
// If we don't get a content length or the request has failed, report it
// as a network error.
- DCHECK(size_ == -1 || size_ == data_.length());
+ DCHECK(size_ == -1 || static_cast<size_t>(size_) == data_.length());
if (size_ == -1) {
size_ = data_.length();
}
diff --git a/webkit/glue/plugins/webplugin_delegate_impl_gtk.cc b/webkit/glue/plugins/webplugin_delegate_impl_gtk.cc
index f4e8029..61cb7ec 100644
--- a/webkit/glue/plugins/webplugin_delegate_impl_gtk.cc
+++ b/webkit/glue/plugins/webplugin_delegate_impl_gtk.cc
@@ -41,9 +41,9 @@ WebPluginDelegateImpl::WebPluginDelegateImpl(
NPAPI::PluginInstance *instance)
: windowed_handle_(0),
windowed_did_set_window_(false),
+ windowless_needs_set_window_(true),
windowless_(false),
plugin_(NULL),
- windowless_needs_set_window_(true),
instance_(instance),
pixmap_(NULL),
first_event_time_(-1.0),
@@ -606,6 +606,8 @@ static bool NPEventFromWebMouseEvent(const WebMouseEvent& event,
case WebMouseEvent::ButtonRight:
button_event.button = Button3;
break;
+ default:
+ NOTREACHED();
}
button_event.same_screen = True;
break;
diff --git a/webkit/glue/plugins/webplugin_delegate_impl_mac.mm b/webkit/glue/plugins/webplugin_delegate_impl_mac.mm
index e40546c..fdaee31 100644
--- a/webkit/glue/plugins/webplugin_delegate_impl_mac.mm
+++ b/webkit/glue/plugins/webplugin_delegate_impl_mac.mm
@@ -94,13 +94,13 @@ WebPluginDelegateImpl* WebPluginDelegateImpl::Create(
WebPluginDelegateImpl::WebPluginDelegateImpl(
gfx::PluginWindowHandle containing_view,
NPAPI::PluginInstance *instance)
- : parent_(containing_view),
- instance_(instance),
- quirks_(0),
- plugin_(NULL),
+ : windowless_needs_set_window_(true),
// all Mac plugins are "windowless" in the Windows/X11 sense
windowless_(true),
- windowless_needs_set_window_(true),
+ plugin_(NULL),
+ instance_(instance),
+ parent_(containing_view),
+ quirks_(0),
handle_event_depth_(0),
user_gesture_message_posted_(this),
user_gesture_msg_factory_(this),
@@ -523,6 +523,8 @@ static bool NPEventFromWebMouseEvent(const WebMouseEvent& event,
case WebMouseEvent::ButtonRight:
np_event->modifiers |= controlKey;
break;
+ default:
+ NOTIMPLEMENTED();
}
switch (event.type) {
case WebInputEvent::MouseMove:
diff --git a/webkit/glue/webplugin_impl.cc b/webkit/glue/webplugin_impl.cc
index dc1627c..ec8965a 100644
--- a/webkit/glue/webplugin_impl.cc
+++ b/webkit/glue/webplugin_impl.cc
@@ -644,7 +644,6 @@ void WebPluginImpl::didReceiveResponse(WebURLLoader* loader,
ResponseInfo response_info;
GetResponseInfo(response, &response_info);
- bool cancel = false;
bool request_is_seekable = true;
if (client->IsMultiByteResponseExpected()) {
if (response.httpStatusCode() == kHttpPartialResponseStatusCode) {