From: WonYoung Choi Date: Tue, 28 Apr 2015 12:55:16 +0000 (+0900) Subject: Cleanup code to remove warning messages at buildtime. X-Git-Tag: accepted/tizen/mobile/20151006.042140~76^2~39^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2eb3970578ba5ab060115c4c00d29c2961585aa6;p=platform%2Fframework%2Fweb%2Fcrosswalk-tizen.git Cleanup code to remove warning messages at buildtime. Change-Id: Ibf101ab759b4a59c3abfacea48318bdc89b78998 --- diff --git a/src/bundle/extension_client.cc b/src/bundle/extension_client.cc index 726db8e..c0d0744 100755 --- a/src/bundle/extension_client.cc +++ b/src/bundle/extension_client.cc @@ -68,7 +68,7 @@ void ExtensionClient::DestroyInstance(const std::string& instance_id) { void ExtensionClient::PostMessageToNative( const std::string& instance_id, const std::string& msg) { - GVariant* value = dbus_extension_client_.Call( + dbus_extension_client_.Call( kDBusInterfaceNameForExtension, kMethodPostMessage, g_variant_new("(ss)", instance_id.c_str(), msg.c_str()), NULL); diff --git a/src/bundle/extension_module.cc b/src/bundle/extension_module.cc index a00d383..c316ef0 100644 --- a/src/bundle/extension_module.cc +++ b/src/bundle/extension_module.cc @@ -317,7 +317,6 @@ void ExtensionModule::PostMessageCallback( return; } - v8::Handle context = info.GetIsolate()->GetCurrentContext(); v8::String::Utf8Value value(info[0]->ToString()); // CHECK(module->instance_id_); @@ -336,7 +335,6 @@ void ExtensionModule::SendSyncMessageCallback( return; } - v8::Handle context = info.GetIsolate()->GetCurrentContext(); v8::String::Utf8Value value(info[0]->ToString()); // CHECK(module->instance_id_); diff --git a/src/bundle/injected_bundle.cc b/src/bundle/injected_bundle.cc index 95af893..c977972 100644 --- a/src/bundle/injected_bundle.cc +++ b/src/bundle/injected_bundle.cc @@ -9,28 +9,28 @@ #include "common/logger.h" #include "bundle/extension_renderer_controller.h" -extern "C" void DynamicSetWidgetInfo(int widget_id) { +extern "C" void DynamicSetWidgetInfo(int /*widget_id*/) { LoggerD("InjectedBundle::DynamicSetWidgetInfo !!"); } -extern "C" void DynamicPluginStartSession(int widget_id, +extern "C" void DynamicPluginStartSession(int /*widget_id*/, v8::Handle context, - int routing_handle, - double scale, - const char* encoded_bundle, - const char* theme, - const char* base_url) { + int /*routing_handle*/, + double /*scale*/, + const char* uuid, + const char* /*theme*/, + const char* /*base_url*/) { LoggerD("InjectedBundle::DynamicPluginStartSession !!"); wrt::ExtensionRendererController& controller = wrt::ExtensionRendererController::GetInstance(); // TODO(wy80.choi): Temporarily, uuid is passed as theme arguments. - controller.InitializeExtensions(theme); + controller.InitializeExtensions(uuid); controller.DidCreateScriptContext(context); } extern "C" void DynamicPluginStopSession( - int widget_id, v8::Handle context) { + int /*widget_id*/, v8::Handle context) { LoggerD("InjectedBundle::DynamicPluginStopSession !!"); wrt::ExtensionRendererController& controller = @@ -39,15 +39,16 @@ extern "C" void DynamicPluginStopSession( } extern "C" void DynamicUrlParsing( - std::string* old_url, std::string* new_url, int widget_id) { + std::string* old_url, std::string* new_url, int /*widget_id*/) { LoggerD("InjectedBundle::DynamicUrlParsing !!"); + *new_url = *old_url; } -extern "C" void DynamicDatabaseAttach(int attach) { +extern "C" void DynamicDatabaseAttach(int /*attach*/) { LoggerD("InjectedBundle::DynamicDatabaseAttach !!"); } -extern "C" void DynamicOnIPCMessage(const Ewk_IPC_Wrt_Message_Data& data) { +extern "C" void DynamicOnIPCMessage(const Ewk_IPC_Wrt_Message_Data& /*data*/) { LoggerD("InjectedBundle::DynamicOnIPCMessage !!"); } diff --git a/src/bundle/module_system.cc b/src/bundle/module_system.cc index 0880870..7849b5f 100644 --- a/src/bundle/module_system.cc +++ b/src/bundle/module_system.cc @@ -25,23 +25,6 @@ const int kModuleSystemEmbedderDataIndex = 8; // pointer back to XWalkExtensionModule. const char* kWrtModuleSystem = "kWrtModuleSystem"; -ModuleSystem* GetModuleSystem( - const v8::FunctionCallbackInfo& info) { - v8::Isolate* isolate = info.GetIsolate(); - v8::HandleScope handle_scope(isolate); - - v8::Handle data = info.Data().As(); - v8::Handle module_system = - data->Get(v8::String::NewFromUtf8(isolate, kWrtModuleSystem)); - if (module_system.IsEmpty() || module_system->IsUndefined()) { - LoggerE("ModuleSystem is not defined."); - return NULL; - } - - return static_cast( - module_system.As()->Value()); -} - } // namespace ModuleSystem::ModuleSystem(v8::Handle context) { diff --git a/src/common/file_utils.cc b/src/common/file_utils.cc index 831f291..d8c93b0 100644 --- a/src/common/file_utils.cc +++ b/src/common/file_utils.cc @@ -26,7 +26,7 @@ std::string DirName(const std::string& path) { } std::string SchemeName(const std::string& uri) { - int pos = uri.find(":"); + size_t pos = uri.find(":"); if (pos != std::string::npos && pos < uri.length()) { return std::string(uri.substr(0, pos)); } else { diff --git a/src/common/string_utils.cc b/src/common/string_utils.cc index 3a2ba3b..620f663 100644 --- a/src/common/string_utils.cc +++ b/src/common/string_utils.cc @@ -36,7 +36,7 @@ bool EndsWith(const std::string& str, const std::string& sub) { std::string ReplaceAll(const std::string& replace, const std::string& from, const std::string& to) { std::string str = replace; - int pos = str.find(from); + size_t pos = str.find(from); while (pos != std::string::npos) { str.replace(pos, from.length(), to); pos = str.find(from, pos+to.length()); diff --git a/src/extension/extension_server.cc b/src/extension/extension_server.cc index 2a277c2..c725ade 100644 --- a/src/extension/extension_server.cc +++ b/src/extension/extension_server.cc @@ -146,8 +146,8 @@ bool ExtensionServer::RegisterSymbols(Extension* extension) { return true; } -void ExtensionServer::GetRuntimeVariable(const char* key, char* value, - size_t value_len) { +void ExtensionServer::GetRuntimeVariable(const char* /*key*/, char* /*value*/, + size_t /*value_len*/) { // TODO(wy80.choi): DBus Call to Runtime to get runtime variable } diff --git a/src/runtime/native_app_window.cc b/src/runtime/native_app_window.cc index 04aab7f..943dcaf 100755 --- a/src/runtime/native_app_window.cc +++ b/src/runtime/native_app_window.cc @@ -15,7 +15,7 @@ NativeAppWindow::~NativeAppWindow() { } Evas_Object* NativeAppWindow::CreateWindowInternal() { - elm_config_preferred_engine_set("opengl_x11"); + elm_config_accel_preference_set("opengl"); return elm_win_add(NULL, "wrt-widget", ELM_WIN_BASIC); } diff --git a/src/runtime/native_window.cc b/src/runtime/native_window.cc index 9afe93f..c48df5c 100755 --- a/src/runtime/native_window.cc +++ b/src/runtime/native_window.cc @@ -140,7 +140,7 @@ void NativeWindow::DidDeleteRequested(void* /*data*/, elm_exit(); } -void NativeWindow::DidProfileChanged(void* data, +void NativeWindow::DidProfileChanged(void* /*data*/, Evas_Object* /*obj*/, void* /*event_info*/) { LoggerD("didProfileChanged"); } diff --git a/src/runtime/resource_manager.cc b/src/runtime/resource_manager.cc index e62f22d..6880b99 100755 --- a/src/runtime/resource_manager.cc +++ b/src/runtime/resource_manager.cc @@ -29,9 +29,10 @@ typedef std::vector AppControlList; // Scheme type const char* kSchemeTypeApp = "app://"; const char* kSchemeTypeFile = "file://"; -const char* kSchemeTypeHttp = "http://"; -const char* kSchemeTypeHttps = "https://"; -const char* kSchemeTypeWidget = "widget://"; +// TODO(wy80.choi): comment out below unused const variables if needed. +// const char* kSchemeTypeHttp = "http://"; +// const char* kSchemeTypeHttps = "https://"; +// const char* kSchemeTypeWidget = "widget://"; // Default Start Files const char* kDefaultStartFiles[] = { diff --git a/src/runtime/runtime.cc b/src/runtime/runtime.cc index 7e17a8f..e12a97b 100755 --- a/src/runtime/runtime.cc +++ b/src/runtime/runtime.cc @@ -126,7 +126,7 @@ void Runtime::OnAppControl(app_control_h app_control) { } } -void Runtime::OnLanguageChanged(const std::string& language) { +void Runtime::OnLanguageChanged(const std::string& /*language*/) { if (application_) { application_->OnLanguageChanged(); } @@ -138,10 +138,10 @@ void Runtime::OnLowMemory() { } } -void Runtime::HandleDBusMethod(GDBusConnection* connection, +void Runtime::HandleDBusMethod(GDBusConnection* /*connection*/, const std::string& method_name, - GVariant* parameters, - GDBusMethodInvocation* invocation) { + GVariant* /*parameters*/, + GDBusMethodInvocation* /*invocation*/) { if (method_name == kMethodNotifyEPCreated) { // TODO(wy80.choi): send signal to injected bundle to make connection // between injected bundle and extension process @@ -152,7 +152,7 @@ void Runtime::HandleDBusMethod(GDBusConnection* connection, } int Runtime::Exec(int argc, char* argv[]) { - ui_app_lifecycle_callback_s ops = {0, }; + ui_app_lifecycle_callback_s ops = {NULL, NULL, NULL, NULL, NULL}; // onCreate ops.create = [](void* data) -> bool { diff --git a/src/runtime/web_application.cc b/src/runtime/web_application.cc index 8727788..02c292f 100755 --- a/src/runtime/web_application.cc +++ b/src/runtime/web_application.cc @@ -247,7 +247,7 @@ void WebApplication::Suspend() { } } -void WebApplication::OnCreatedNewWebView(WebView* view, WebView* new_view) { +void WebApplication::OnCreatedNewWebView(WebView* /*view*/, WebView* new_view) { if (view_stack_.size() > 0 && view_stack_.front() != NULL) view_stack_.front()->SetVisibility(false); @@ -283,7 +283,7 @@ void WebApplication::OnClosedWebView(WebView * view) { void WebApplication::OnReceivedWrtMessage( WebView* /*view*/, - Ewk_IPC_Wrt_Message_Data* message) { + Ewk_IPC_Wrt_Message_Data* /*message*/) { // TODO(wy80.choi) : Handle messages from injected bundle? // ex. SendRuntimeMessage to hide / exit application. } @@ -361,13 +361,13 @@ bool WebApplication::OnContextMenuDisabled(WebView* /*view*/) { true); } -void WebApplication::OnLoadStart(WebView* view) { +void WebApplication::OnLoadStart(WebView* /*view*/) { LoggerD("LoadStart"); } -void WebApplication::OnLoadFinished(WebView* view) { +void WebApplication::OnLoadFinished(WebView* /*view*/) { LoggerD("LoadFinished"); } -void WebApplication::OnRendered(WebView* view) { +void WebApplication::OnRendered(WebView* /*view*/) { LoggerD("Rendered"); } diff --git a/src/runtime/web_view_impl.cc b/src/runtime/web_view_impl.cc index 5592968..870fc93 100755 --- a/src/runtime/web_view_impl.cc +++ b/src/runtime/web_view_impl.cc @@ -342,7 +342,7 @@ void WebViewImpl::InitIPCMessageCallback() { void WebViewImpl::InitOrientaionLockCallback() { // Orientation lock callback - auto orientation_lock_callback = [](Evas_Object* o, + auto orientation_lock_callback = [](Evas_Object*, Eina_Bool need_lock, int orientation, void* user_data) -> Eina_Bool {