From 53f2d4669d89289385ebe89dbf4be985dca54d90 Mon Sep 17 00:00:00 2001 From: "Eunki, Hong" Date: Fri, 1 Apr 2022 19:03:18 +0900 Subject: [PATCH] Remove build warnings Remove some annoying build warnings Change-Id: I60065818ec8fa32d90a12258cb75d6d5e70977c2 Signed-off-by: Eunki, Hong --- .../tizen-wayland/drag-and-drop-impl-ecore-wl2.cpp | 18 +++++++++++------- .../gles-impl/egl-graphics-controller-debug.cpp | 7 ++++++- .../tizen-wayland/ecore-wl2/window-base-ecore-wl2.cpp | 10 ++++------ 3 files changed, 21 insertions(+), 14 deletions(-) diff --git a/dali/internal/drag-and-drop/tizen-wayland/drag-and-drop-impl-ecore-wl2.cpp b/dali/internal/drag-and-drop/tizen-wayland/drag-and-drop-impl-ecore-wl2.cpp index 492210c..dd020c0 100644 --- a/dali/internal/drag-and-drop/tizen-wayland/drag-and-drop-impl-ecore-wl2.cpp +++ b/dali/internal/drag-and-drop/tizen-wayland/drag-and-drop-impl-ecore-wl2.cpp @@ -125,7 +125,7 @@ bool DragAndDropEcoreWl::StartDragAndDrop(Dali::Actor source, Dali::Actor shadow // Set Drag Source Data mMimeType = data.GetMimeType(); - mData = data.GetData(); + mData = data.GetData(); // Apply Shadow Property shadow.SetProperty(Dali::Actor::Property::SIZE, Vector2(150, 150)); @@ -152,7 +152,6 @@ bool DragAndDropEcoreWl::StartDragAndDrop(Dali::Actor source, Dali::Actor shadow mimeTypes[0] = mMimeType.c_str(); mimeTypes[1] = NULL; - // Set mime type ecore_wl2_dnd_drag_types_set(input, (const char**)mimeTypes); @@ -212,7 +211,7 @@ void DragAndDropEcoreWl::SendData(void* event) (mMimeType.find("markup") != std::string::npos) || (mMimeType.find("image") != std::string::npos)) { - bufferSize += 1; + bufferSize += 1; } char* buffer = new char[bufferSize]; @@ -224,7 +223,12 @@ void DragAndDropEcoreWl::SendData(void* event) memcpy(buffer, mData.c_str(), dataLength); buffer[dataLength] = '\0'; - write(ev->fd, buffer, bufferSize); + auto ret = write(ev->fd, buffer, bufferSize); + if(DALI_UNLIKELY(ret != bufferSize)) + { + DALI_LOG_ERROR("write(ev->fd) return %d! Pleacse check it\n", static_cast(ret)); + } + close(ev->fd); if(mDragWindow) @@ -232,7 +236,7 @@ void DragAndDropEcoreWl::SendData(void* event) mDragWindow.Hide(); } - delete [] buffer; + delete[] buffer; } void DragAndDropEcoreWl::ReceiveData(void* event) @@ -255,7 +259,7 @@ bool DragAndDropEcoreWl::CalculateDragEvent(void* event) Dali::DragAndDrop::DragEvent dragEvent; Dali::Vector2 curPosition(ev->x, ev->y); - for(int i = 0; i < mDropTargets.size(); i++) + for(std::size_t i = 0; i < mDropTargets.size(); i++) { Vector2 position = mDropTargets[i].target.GetProperty(Dali::Actor::Property::POSITION); Vector2 size = mDropTargets[i].target.GetProperty(Dali::Actor::Property::SIZE); @@ -297,7 +301,7 @@ bool DragAndDropEcoreWl::CalculateViewRegion(void* event) // Check the target object region mTargetIndex = -1; - for(int i = 0; i < mDropTargets.size(); i++) + for(std::size_t i = 0; i < mDropTargets.size(); i++) { Vector2 position = mDropTargets[i].target.GetProperty(Dali::Actor::Property::POSITION); Vector2 size = mDropTargets[i].target.GetProperty(Dali::Actor::Property::SIZE); diff --git a/dali/internal/graphics/gles-impl/egl-graphics-controller-debug.cpp b/dali/internal/graphics/gles-impl/egl-graphics-controller-debug.cpp index 9ee5721..4ac58ae 100644 --- a/dali/internal/graphics/gles-impl/egl-graphics-controller-debug.cpp +++ b/dali/internal/graphics/gles-impl/egl-graphics-controller-debug.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd. + * Copyright (c) 2022 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -145,6 +145,11 @@ void DumpCommandBuffer(FILE* output, const GLES::CommandBuffer* commandBuffer) fprintf(output, "{\"Cmd\":\"DRAW_INDEXED\"}\n"); break; } + case GLES::CommandType::DRAW_NATIVE: + { + fprintf(output, "{\"Cmd\":\"DRAW_NATIVE\"}\n"); + break; + } case GLES::CommandType::DRAW_INDEXED_INDIRECT: { fprintf(output, "{\"Cmd\":\"DRAW_INDEXED_INDIRECT\"}\n"); diff --git a/dali/internal/window-system/tizen-wayland/ecore-wl2/window-base-ecore-wl2.cpp b/dali/internal/window-system/tizen-wayland/ecore-wl2/window-base-ecore-wl2.cpp index dd15ec4..0a490a0 100644 --- a/dali/internal/window-system/tizen-wayland/ecore-wl2/window-base-ecore-wl2.cpp +++ b/dali/internal/window-system/tizen-wayland/ecore-wl2/window-base-ecore-wl2.cpp @@ -508,9 +508,8 @@ static Eina_Bool EcoreEventEffectEnd(void* data, int type, void* event) static Eina_Bool EcoreEventSeatKeyboardRepeatChanged(void* data, int type, void* event) { - Ecore_Wl2_Event_Seat_Keyboard_Repeat_Changed* keyboardRepeat = static_cast(event); - WindowBaseEcoreWl2* windowBase = static_cast(data); - DALI_LOG_INFO(gWindowBaseLogFilter, Debug::General, "WindowBaseEcoreWl2::EcoreEventSeatKeyboardRepeatChanged, id[ %d ]\n", keyboardRepeat->id); + WindowBaseEcoreWl2* windowBase = static_cast(data); + DALI_LOG_INFO(gWindowBaseLogFilter, Debug::General, "WindowBaseEcoreWl2::EcoreEventSeatKeyboardRepeatChanged, id[ %d ]\n", static_cast(event)->id); if(windowBase) { windowBase->OnKeyboardRepeatSettingsChanged(); @@ -568,9 +567,8 @@ static void VconfNotifyFontSizeChanged(keynode_t* node, void* data) static Eina_Bool EcoreEventWindowRedrawRequest(void* data, int type, void* event) { - Ecore_Wl2_Event_Window_Redraw_Request* windowRedrawRequest = static_cast(event); - WindowBaseEcoreWl2* windowBase = static_cast(data); - DALI_LOG_INFO(gWindowBaseLogFilter, Debug::General, "WindowBaseEcoreWl2::EcoreEventWindowRedrawRequest, window[ %d ]\n", windowRedrawRequest->win); + WindowBaseEcoreWl2* windowBase = static_cast(data); + DALI_LOG_INFO(gWindowBaseLogFilter, Debug::General, "WindowBaseEcoreWl2::EcoreEventWindowRedrawRequest, window[ %d ]\n", static_cast(event)->win); if(windowBase) { windowBase->OnEcoreEventWindowRedrawRequest(); -- 2.7.4