wayland_egl: Fixed build warning. 14/129414/2
authorjoonbum.ko <joonbum.ko@samsung.com>
Tue, 16 May 2017 09:51:59 +0000 (18:51 +0900)
committerjoonbum.ko <joonbum.ko@samsung.com>
Tue, 16 May 2017 10:31:52 +0000 (19:31 +0900)
Change-Id: I21132792d3606114dc3cb96192a9703d7836d8e1
Signed-off-by: joonbum.ko <joonbum.ko@samsung.com>
src/wayland-egl/wayland-egl.c

index 475bf7c..423de31 100644 (file)
@@ -16,27 +16,27 @@ unsigned int wl_egl_log_level;
 
 /* WL-EGL Log Level - 0:unintialized, 1:initialized(no logging), 2:min log, 3:more log */
 #define WL_EGL_LOG(lvl, f, x...) {                                                             \
-               if(wl_egl_log_level == 1) {                                                             \
+               if (wl_egl_log_level == 1) {                                                    \
                }                                                                                                               \
-               else if(wl_egl_log_level > 1) {                                                 \
-                       if(wl_egl_log_level <= lvl)                                                     \
+               else if (wl_egl_log_level > 1) {                                                \
+                       if (wl_egl_log_level <= lvl)                                            \
                                WL_EGL_LOG_PRINT(f, ##x)                                                \
                }                                                                                                               \
                else {                                                                                                  \
                        char *env = getenv("WL_EGL_LOG_LEVEL");                         \
-                       if(env == NULL)                                                                         \
+                       if (env == NULL)                                                                        \
                                wl_egl_log_level = 1;                                                   \
                        else                                                                                            \
                                wl_egl_log_level = atoi(env);                                   \
                                                                                                                                \
-                       if(wl_egl_log_level > 1 && wl_egl_log_level <= lvl)     \
+                       if (wl_egl_log_level > 1 && wl_egl_log_level <= lvl)\
                                WL_EGL_LOG_PRINT(f, ##x)                                                \
                }                                                                                                               \
        }
 
 #define WL_EGL_LOG_PRINT(fmt, args...) {                                                                               \
                printf("[\x1b[32mWL-EGL\x1b[0m %d:%d|\x1b[32m%s\x1b[0m|%d] " fmt "\n",  \
-                       getpid(), (int)syscall(SYS_gettid), __func__,__LINE__, ##args);         \
+                       getpid(), (int)syscall(SYS_gettid), __func__, __LINE__, ##args);        \
        }
 
 #define WL_EGL_ERR(f, x...)    {                                                                                                       \
@@ -53,8 +53,6 @@ wl_egl_window_resize(struct wl_egl_window *egl_window,
                                         int width, int height,
                                         int dx, int dy)
 {
-       wl_egl_window_rotation rotation;
-
        if (egl_window == NULL) {
                WL_EGL_ERR("egl_window is NULL");
                return;
@@ -150,7 +148,8 @@ wl_egl_window_set_rotation(struct wl_egl_window *egl_window,
        }
 
        if (egl_window->rotation == rotation) {
-               WL_EGL_LOG(2, "rotation(%d) egl_window->rotation(%d) already rotated");
+               WL_EGL_LOG(2, "rotation(%d) egl_window->rotation(%d) already rotated",
+                                  rotation, egl_window->rotation);
                return;
        }