diff options
author | tony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-21 07:17:41 +0000 |
---|---|---|
committer | tony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-21 07:17:41 +0000 |
commit | 2f312ab5f419b77456eba5e0362af3adaf94f6ad (patch) | |
tree | de5260b704b376e0c602d3ba5364072217c29732 /webkit | |
parent | 10821128cb8b272856d1df04fdf102f1dda1b3f2 (diff) | |
download | chromium_src-2f312ab5f419b77456eba5e0362af3adaf94f6ad.zip chromium_src-2f312ab5f419b77456eba5e0362af3adaf94f6ad.tar.gz chromium_src-2f312ab5f419b77456eba5e0362af3adaf94f6ad.tar.bz2 |
Enable -Werror on Linux and Win for src/webkit/
BUG=21140
Review URL: http://codereview.chromium.org/1749001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45157 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r-- | webkit/appcache/appcache_disk_cache.h | 4 | ||||
-rw-r--r-- | webkit/database/vfs_backend.cc | 2 | ||||
-rw-r--r-- | webkit/glue/plugins/plugin_host.cc | 4 | ||||
-rw-r--r-- | webkit/glue/plugins/plugin_instance.cc | 2 | ||||
-rw-r--r-- | webkit/glue/webkit_glue.cc | 3 | ||||
-rw-r--r-- | webkit/webkit.gyp | 8 |
6 files changed, 10 insertions, 13 deletions
diff --git a/webkit/appcache/appcache_disk_cache.h b/webkit/appcache/appcache_disk_cache.h index cc54fd9..c295067 100644 --- a/webkit/appcache/appcache_disk_cache.h +++ b/webkit/appcache/appcache_disk_cache.h @@ -81,7 +81,9 @@ class AppCacheDiskCache { }; typedef std::vector<PendingCall> PendingCalls; - bool is_initializing() const { return create_backend_callback_.get(); } + bool is_initializing() const { + return create_backend_callback_.get() != NULL; + } int Init(net::CacheType cache_type, const FilePath& directory, int cache_size, bool force, net::CompletionCallback* callback); void OnCreateBackendComplete(int rv); diff --git a/webkit/database/vfs_backend.cc b/webkit/database/vfs_backend.cc index 8c1b50b..8cb8e05 100644 --- a/webkit/database/vfs_backend.cc +++ b/webkit/database/vfs_backend.cc @@ -25,7 +25,7 @@ bool VfsBackend::FileTypeIsMainDB(int desired_flags) { // static bool VfsBackend::OpenTypeIsReadWrite(int desired_flags) { - return desired_flags & SQLITE_OPEN_READWRITE; + return (desired_flags & SQLITE_OPEN_READWRITE) != 0; } // static diff --git a/webkit/glue/plugins/plugin_host.cc b/webkit/glue/plugins/plugin_host.cc index 9598a09..9724cd2 100644 --- a/webkit/glue/plugins/plugin_host.cc +++ b/webkit/glue/plugins/plugin_host.cc @@ -900,7 +900,7 @@ void* NPN_GetJavaPeer(NPP) { void NPN_PushPopupsEnabledState(NPP id, NPBool enabled) { scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id); if (plugin) - plugin->PushPopupsEnabledState(enabled); + plugin->PushPopupsEnabledState(enabled ? true : false); } void NPN_PopPopupsEnabledState(NPP id) { @@ -961,7 +961,7 @@ NPError NPN_GetValueForURL(NPP id, // Allocate this using the NPAPI allocator. The plugin will call // NPN_Free to free this. *value = static_cast<char*>(NPN_MemAlloc(result.length() + 1)); - strncpy(*value, result.c_str(), result.length() + 1); + base::strlcpy(*value, result.c_str(), result.length() + 1); *len = result.length(); return NPERR_NO_ERROR; diff --git a/webkit/glue/plugins/plugin_instance.cc b/webkit/glue/plugins/plugin_instance.cc index db5ccbf..3cfae8b 100644 --- a/webkit/glue/plugins/plugin_instance.cc +++ b/webkit/glue/plugins/plugin_instance.cc @@ -420,7 +420,7 @@ uint32 PluginInstance::ScheduleTimer(uint32 interval, // Record timer interval and repeat. TimerInfo info; info.interval = interval; - info.repeat = repeat; + info.repeat = repeat ? true : false; timers_[timer_id] = info; // Schedule the callback. diff --git a/webkit/glue/webkit_glue.cc b/webkit/glue/webkit_glue.cc index f36a0e2..6aa6479 100644 --- a/webkit/glue/webkit_glue.cc +++ b/webkit/glue/webkit_glue.cc @@ -147,7 +147,8 @@ int PageNumberForElementById(WebFrame* web_frame, int NumberOfPages(WebFrame* web_frame, float page_width_in_pixels, float page_height_in_pixels) { - WebSize size(page_width_in_pixels, page_height_in_pixels); + WebSize size(static_cast<int>(page_width_in_pixels), + static_cast<int>(page_height_in_pixels)); int number_of_pages = web_frame->printBegin(size); web_frame->printEnd(); return number_of_pages; diff --git a/webkit/webkit.gyp b/webkit/webkit.gyp index 3edd0fe5..373073e 100644 --- a/webkit/webkit.gyp +++ b/webkit/webkit.gyp @@ -14,13 +14,7 @@ 'tools/test_shell/test_shell.gypi', ], 'variables': { - # We can't turn on warnings on Windows and Linux until we upstream the - # WebKit API. - 'conditions': [ - ['OS=="mac"', { - 'chromium_code': 1, - }], - ], + 'chromium_code': 1, # List of DevTools source files, ordered by dependencies. It is used both # for copying them to resource dir, and for generating 'devtools.html' file. |