From: Timo Lotterbach Date: Fri, 20 Jul 2012 07:04:13 +0000 (-0700) Subject: LayerManagerSerivce: removed some minor compiler warnings X-Git-Tag: ivi-layer-management_version_0_9_7_rc2~32 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=54c78808fb653264587cf13162529532053d0194;p=profile%2Fivi%2Flayer-management.git LayerManagerSerivce: removed some minor compiler warnings --- diff --git a/LayerManagerExamples/GLXApplicationExample/CMakeLists.txt b/LayerManagerExamples/GLXApplicationExample/CMakeLists.txt index d41de52..e6793a7 100644 --- a/LayerManagerExamples/GLXApplicationExample/CMakeLists.txt +++ b/LayerManagerExamples/GLXApplicationExample/CMakeLists.txt @@ -39,7 +39,7 @@ find_package (OpenGL REQUIRED) include_directories(${OPENGL_INCLUDE_DIR}) find_package(X11 REQUIRED) -include_directories(X11_INCLUDE_DIR) +include_directories(${X11_INCLUDE_DIR}) set(LIBS ${LIBS} ${OPENGL_LIBRARIES} ${X11_LIBRARIES} LayerManagerUtils) target_link_libraries(GLX11ApplicationExample ${LIBS} ilmClient) diff --git a/LayerManagerExamples/GLXApplicationExample/src/glx_helper.cpp b/LayerManagerExamples/GLXApplicationExample/src/glx_helper.cpp index fcf3b5e..c54c6fe 100644 --- a/LayerManagerExamples/GLXApplicationExample/src/glx_helper.cpp +++ b/LayerManagerExamples/GLXApplicationExample/src/glx_helper.cpp @@ -121,7 +121,6 @@ t_ilm_bool createX11Context(t_ilm_int width, t_ilm_int height) t_ilm_bool createGLXContext(t_ilm_int width, t_ilm_int height) { - t_ilm_bool result = ILM_TRUE; int glxMajor; int glxMinor; @@ -144,45 +143,34 @@ t_ilm_bool createGLXContext(t_ilm_int width, t_ilm_int height) t_ilm_layer layerid = (t_ilm_layer) LAYER_EXAMPLE_X_APPLICATIONS; // TODO: remove all C stylec asts in C++ code t_ilm_surface surfaceid = (t_ilm_surface) SURFACE_EXAMPLE_GLXX11_APPLICATION; - //if (error == ILM_FAILED) return ILM_FALSE; - printf("create a surface %lu\n", (t_ilm_nativehandle) (g_x11ContextStruct.x11Window)); - ilmErrorTypes error = ilm_surfaceCreate((t_ilm_nativehandle) g_x11ContextStruct.x11Window, width, height, ILM_PIXELFORMAT_RGBA_8888, &surfaceid); - - //if (error == ILM_FAILED) return ILM_FALSE; + ilm_surfaceCreate((t_ilm_nativehandle) g_x11ContextStruct.x11Window, width, height, ILM_PIXELFORMAT_RGBA_8888, &surfaceid); printf("set surface dest region\n"); - error = ilm_surfaceSetDestinationRectangle(surfaceid, 0, 0, width, height); - - //if (error == ILM_FAILED) return ILM_FALSE; + ilm_surfaceSetDestinationRectangle(surfaceid, 0, 0, width, height); printf("set surface src region\n"); - error = ilm_surfaceSetSourceRectangle(surfaceid, 0, 0, width, height); - - //if (error == ILM_FAILED) return ILM_FALSE; + ilm_surfaceSetSourceRectangle(surfaceid, 0, 0, width, height); printf("add surface to layer\n"); - error = ilm_layerAddSurface(layerid, surfaceid); + ilm_layerAddSurface(layerid, surfaceid); printf("Set surface visible\n"); - error = ilm_surfaceSetVisibility(surfaceid, ILM_TRUE); + ilm_surfaceSetVisibility(surfaceid, ILM_TRUE); printf("Set surface opacity\n"); - error = ilm_surfaceSetOpacity(surfaceid, 0.75f); - - //if (error == ILM_FAILED) return ILM_FALSE; + ilm_surfaceSetOpacity(surfaceid, 0.75f); #ifdef WITH_INPUT_EVENTS xeventInitialiaze(g_x11ContextStruct.x11Display, surfaceid, 0, 0, width, height); #endif printf("commit\n"); - error = ilm_commitChanges(); + // commit will indicate error, if any command failed + ilmErrorTypes error = ilm_commitChanges(); - //if (error == ILM_FAILED) return ILM_FALSE; - - return result; + return (error != ILM_FAILED) ? ILM_TRUE : ILM_FALSE; } void destroyGLXContext() diff --git a/LayerManagerPlugins/IpcModules/TcpIpcModule/tests/LoopbackTest.cpp b/LayerManagerPlugins/IpcModules/TcpIpcModule/tests/LoopbackTest.cpp index 5fe4194..2de0bf0 100644 --- a/LayerManagerPlugins/IpcModules/TcpIpcModule/tests/LoopbackTest.cpp +++ b/LayerManagerPlugins/IpcModules/TcpIpcModule/tests/LoopbackTest.cpp @@ -39,7 +39,7 @@ public: unsigned int* base = (unsigned int*)ipcModule; for (int i = 0; i < apiEntryCount; ++i) { - ASSERT_NE(0, base[i]); + ASSERT_NE(0u, base[i]); } } diff --git a/LayerManagerPlugins/Renderers/Platform/GLXRenderer/src/X11GLXRenderer.cpp b/LayerManagerPlugins/Renderers/Platform/GLXRenderer/src/X11GLXRenderer.cpp index c58c292..d75074b 100644 --- a/LayerManagerPlugins/Renderers/Platform/GLXRenderer/src/X11GLXRenderer.cpp +++ b/LayerManagerPlugins/Renderers/Platform/GLXRenderer/src/X11GLXRenderer.cpp @@ -107,16 +107,14 @@ void X11GLXRenderer::doScreenShotOfSurface(std::string fileToSave, uint id, uint uint X11GLXRenderer::getNumberOfHardwareLayers(uint screenID) { - uint screen_id; - screen_id = screenID; + (void)screenID; return 0; // TODO } uint* X11GLXRenderer::getScreenResolution(uint screenID) { - uint screen_id; - screen_id = screenID; - + (void)screenID; + uint * resolution = new uint[2]; resolution[0] = m_width; resolution[1] = m_height; diff --git a/LayerManagerService/tests/SurfaceTest.cpp b/LayerManagerService/tests/SurfaceTest.cpp index d80f658..488b152 100644 --- a/LayerManagerService/tests/SurfaceTest.cpp +++ b/LayerManagerService/tests/SurfaceTest.cpp @@ -55,7 +55,7 @@ TEST_F(SurfaceTest, defaultConstructor) EXPECT_EQ(0, surface.OriginalSourceWidth); /// make sure, surface has default visibility - EXPECT_EQ(false, surface.getVisibility()); + EXPECT_FALSE(surface.getVisibility()); /// make sure, surface has default opacity EXPECT_DOUBLE_EQ(1.0, surface.getOpacity()); @@ -100,7 +100,7 @@ TEST_F(SurfaceTest, specialConstructor) EXPECT_EQ(0, surface.OriginalSourceWidth); /// make sure, surface has default visibility - EXPECT_EQ(false, surface.getVisibility()); + EXPECT_FALSE(surface.getVisibility()); /// make sure, surface has default opacity EXPECT_DOUBLE_EQ(1.0, surface.getOpacity());