Fixed debug macros compilation errors 12/162812/2
authorPaweł Stawicki <p.stawicki@samsung.com>
Tue, 5 Dec 2017 10:57:41 +0000 (11:57 +0100)
committerJihoon Kim <jihoon48.kim@samsung.com>
Mon, 25 Dec 2017 22:47:12 +0000 (22:47 +0000)
Change-Id: I4c149b3b8a7a66f765bf4446d4cb7af4a1427356

scl/gwes/efl/sclgraphics-efl.cpp
scl/include/scldebug.h
scl/scldebug.cpp

index 721a85a..1cc88cb 100644 (file)
@@ -274,7 +274,7 @@ CSCLGraphicsImplEfl::draw_image(sclwindow window, const scldrawctx draw_ctx, scl
 {
     SCL_DEBUG();
 
-    scl_assert_return(image_path);
+    scl_assert_return_null(image_path);
 
     CSCLResourceCache *cache = CSCLResourceCache::get_instance();
     CSCLWindows *windows = CSCLWindows::get_instance();
index c43ffc7..722441b 100644 (file)
@@ -77,7 +77,7 @@ extern "C"
 #define SCL_DEBUG_ELAPASED_TIME_END() SCL_DEBUG_ELAPASED_TIME(__FILE__, __LINE__, __FUNCTION__, MEASURE_END);
 
 //#define SCL_DEBUG() SCL_DEBUG_TIME(__FILE__, __LINE__, __FUNCTION__ );
-#define SCL_DEBUG() NULL;
+#define SCL_DEBUG()
 
 #define SCL_DEBUG_START() \
     static struct timeval t0;\
@@ -89,7 +89,7 @@ extern "C"
     gettimeofday(&t1, NULL);\
     float etime;\
     etime = ((t1.tv_sec * 1000000 + t1.tv_usec) - (t0.tv_sec * 1000000 + t0.tv_usec))/1000000.0;\
-    printf("[%-20.20s][%04d][%s] E: " mc_green "%f" mc_normal " (S:%u) \n", __FILE__, __LINE__, __FUNCTION__, etime, (t0.tv_sec * 1000000 + t0.tv_usec) );
+    printf("[%-20.20s][%04d][%s] E: " mc_green "%f" mc_normal " (S:%lu) \n", __FILE__, __LINE__, __FUNCTION__, etime, (t0.tv_sec * 1000000 + t0.tv_usec) );
 
 #define IO_TEST
 
index 310fc4b..824b08e 100644 (file)
@@ -46,10 +46,11 @@ float SCL_DEBUG_TIME(const char* fileStr, int line, const char* str)
         if (strncmp(str, "get_", 4) == 0) {
             //printf("[%-20.20s]%04d [T:%u][E:" mc_red "%f" mc_normal "]" mc_normal " %s" mc_normal "\n", pFileStr, line, (t1.tv_sec * 1000000 + t1.tv_usec), etime, str);
         } else {
-            printf("[%-20.20s]%04d [T:%u][E:" mc_red "%f" mc_normal "]" mc_blue " %s" mc_normal "\n", pFileStr, line, (t1.tv_sec * 1000000 + t1.tv_usec), etime, str);
+            printf("[%-20.20s]%04d [T:%lu][E:" mc_red "%f" mc_normal "]" mc_blue " %s" mc_normal "\n", pFileStr, line, (t1.tv_sec * 1000000 + t1.tv_usec), etime, str);
         }
         t0 = t1;
     }
+    return etime;
 }
 
 /* Measure elapased time */
@@ -57,7 +58,7 @@ static float _SCL_DEBUG_ELAPASED_TIME(const char* str, struct timeval t0, struct
 {
     float etime;
     etime = ((t1.tv_sec * 1000000 + t1.tv_usec) - (t0.tv_sec * 1000000 + t0.tv_usec))/1000000.0;
-    printf("[%s] elap-time = " mc_green "%f" mc_normal " (%u~%u) \n", str, etime, (t0.tv_sec * 1000000 + t0.tv_usec), (t1.tv_sec * 1000000 + t1.tv_usec));
+    printf("[%s] elap-time = " mc_green "%f" mc_normal " (%lu~%lu) \n", str, etime, (t0.tv_sec * 1000000 + t0.tv_usec), (t1.tv_sec * 1000000 + t1.tv_usec));
     return etime;
 }
 
@@ -68,16 +69,18 @@ float SCL_DEBUG_ELAPASED_TIME(const char* fileStr, int line, const char* str, in
     static struct timeval s_tv2;
     static int s_start_line = 0;
     static int s_end_line = 0;
+    float etime = 0.0;
     if (type == MEASURE_START) {
         gettimeofday(&s_tv1, NULL);
         s_start_line = line;
-        printf("[%-20.20s]%04d [T:%u]" mc_blue " %s" mc_normal "\n", fileStr, line, (s_tv1.tv_sec * 1000000 + s_tv1.tv_usec), str);
+        printf("[%-20.20s]%04d [T:%lu]" mc_blue " %s" mc_normal "\n", fileStr, line, (s_tv1.tv_sec * 1000000 + s_tv1.tv_usec), str);
     } else if (type == MEASURE_END) {
         gettimeofday(&s_tv2, NULL);
         s_end_line = line;
         char printStr[100];
         snprintf(printStr, 100, "%s(Line:%d~%d)", str, s_start_line, s_end_line);
-        _SCL_DEBUG_ELAPASED_TIME(printStr, s_tv1, s_tv2);
+        etime = _SCL_DEBUG_ELAPASED_TIME(printStr, s_tv1, s_tv2);
     }
+    return etime;
 }
 #endif