Remove build warnings 65/273265/2
authorEunki, Hong <eunkiki.hong@samsung.com>
Fri, 1 Apr 2022 10:03:18 +0000 (19:03 +0900)
committerEunki, Hong <eunkiki.hong@samsung.com>
Fri, 1 Apr 2022 12:30:41 +0000 (21:30 +0900)
Remove some annoying build warnings

Change-Id: I60065818ec8fa32d90a12258cb75d6d5e70977c2
Signed-off-by: Eunki, Hong <eunkiki.hong@samsung.com>
dali/internal/drag-and-drop/tizen-wayland/drag-and-drop-impl-ecore-wl2.cpp
dali/internal/graphics/gles-impl/egl-graphics-controller-debug.cpp
dali/internal/window-system/tizen-wayland/ecore-wl2/window-base-ecore-wl2.cpp

index 492210c..dd020c0 100644 (file)
@@ -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<int>(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<Vector2>(Dali::Actor::Property::POSITION);
     Vector2 size          = mDropTargets[i].target.GetProperty<Vector2>(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<Vector2>(Dali::Actor::Property::POSITION);
     Vector2 size     = mDropTargets[i].target.GetProperty<Vector2>(Dali::Actor::Property::SIZE);
index 9ee5721..4ac58ae 100644 (file)
@@ -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");
index dd15ec4..0a490a0 100644 (file)
@@ -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<Ecore_Wl2_Event_Seat_Keyboard_Repeat_Changed*>(event);
-  WindowBaseEcoreWl2*                           windowBase     = static_cast<WindowBaseEcoreWl2*>(data);
-  DALI_LOG_INFO(gWindowBaseLogFilter, Debug::General, "WindowBaseEcoreWl2::EcoreEventSeatKeyboardRepeatChanged, id[ %d ]\n", keyboardRepeat->id);
+  WindowBaseEcoreWl2* windowBase = static_cast<WindowBaseEcoreWl2*>(data);
+  DALI_LOG_INFO(gWindowBaseLogFilter, Debug::General, "WindowBaseEcoreWl2::EcoreEventSeatKeyboardRepeatChanged, id[ %d ]\n", static_cast<Ecore_Wl2_Event_Seat_Keyboard_Repeat_Changed*>(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<Ecore_Wl2_Event_Window_Redraw_Request*>(event);
-  WindowBaseEcoreWl2*                    windowBase          = static_cast<WindowBaseEcoreWl2*>(data);
-  DALI_LOG_INFO(gWindowBaseLogFilter, Debug::General, "WindowBaseEcoreWl2::EcoreEventWindowRedrawRequest, window[ %d ]\n", windowRedrawRequest->win);
+  WindowBaseEcoreWl2* windowBase = static_cast<WindowBaseEcoreWl2*>(data);
+  DALI_LOG_INFO(gWindowBaseLogFilter, Debug::General, "WindowBaseEcoreWl2::EcoreEventWindowRedrawRequest, window[ %d ]\n", static_cast<Ecore_Wl2_Event_Window_Redraw_Request*>(event)->win);
   if(windowBase)
   {
     windowBase->OnEcoreEventWindowRedrawRequest();