summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
Diffstat (limited to 'webkit')
-rw-r--r--webkit/api/src/gtk/WebFontInfo.cpp2
-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
-rw-r--r--webkit/webkit.gyp7
9 files changed, 23 insertions, 15 deletions
diff --git a/webkit/api/src/gtk/WebFontInfo.cpp b/webkit/api/src/gtk/WebFontInfo.cpp
index 9365ed2..4107cea 100644
--- a/webkit/api/src/gtk/WebFontInfo.cpp
+++ b/webkit/api/src/gtk/WebFontInfo.cpp
@@ -41,7 +41,7 @@ namespace WebKit {
WebCString WebFontInfo::familyForChars(const WebUChar* characters, size_t numCharacters)
{
FcCharSet* cset = FcCharSetCreate();
- for (int i = 0; i < numCharacters; ++i) {
+ for (size_t i = 0; i < numCharacters; ++i) {
if (U16_IS_SURROGATE(characters[i])
&& U16_IS_SURROGATE_LEAD(characters[i])
&& i != numCharacters - 1
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) {
diff --git a/webkit/webkit.gyp b/webkit/webkit.gyp
index 9c77a82..0224a0c 100644
--- a/webkit/webkit.gyp
+++ b/webkit/webkit.gyp
@@ -9,6 +9,13 @@
'variables': {
# TODO: remove this helper when we have loops in GYP
'apply_locales_cmd': ['python', '../chrome/tools/build/apply_locales.py',],
+
+ # We can't turn on warnings on Windows until we upstream the WebKit API.
+ 'conditions': [
+ ['OS!="win"', {
+ 'chromium_code': 1,
+ }],
+ ],
},
'targets': [
{