fix build-break in case secure log is disable
authorBoram Park <boram1288.park@samsung.com>
Tue, 25 Jun 2013 08:24:12 +0000 (17:24 +0900)
committerBoram Park <boram1288.park@samsung.com>
Tue, 25 Jun 2013 08:26:30 +0000 (17:26 +0900)
Change-Id: Ifa5c8e7ca49d8de7ab4de48ac235ca7c03a84ab7

lib/xdbg_log.h
module/xdbg_module_evlog.c

index 5cf4668..bf25260 100644 (file)
@@ -118,7 +118,7 @@ void* xDbgLog            (unsigned int module, int logoption, const char *file,
 #ifdef _SECURE_LOG
 #define XDBG_SECURE(mod, fmt, ARG...)     XLOG_SECURE(mod, "[%s] "fmt, __FUNCTION__, ##ARG)
 #else
-#define XDBG_SECURE(mod, fmt, ARG...)     (0)
+#define XDBG_SECURE(mod, fmt, ARG...)     do { } while(0)
 #endif
 
 #define XDBG_NEVER_GET_HERE(mod)          XLOG_ERROR(mod, "[%s:%d] ** NEVER GET HERE **\n", __FUNCTION__,__LINE__)
index 2558391..2722891 100644 (file)
@@ -402,6 +402,7 @@ static void evtPrint (EvlogType type, ClientPtr client, xEvent *ev, ReplyInfoRec
     xDbgDistroyRegionList(&evinfo);
 }
 
+#ifdef _SECURE_LOG
 static const char*
 _traceGetWindowName (ClientPtr client, Window window)
 {
@@ -435,6 +436,7 @@ _traceGetWindowName (ClientPtr client, Window window)
 
     return NULL;
 }
+#endif
 
 static void
 _traceFlush (CallbackListPtr *pcbl, pointer nulldata, pointer calldata)
@@ -465,6 +467,8 @@ _traceEvent (CallbackListPtr *pcbl, pointer nulldata, pointer calldata)
     int ev; /* event index */
     static int xi2_opcode = -1;
     xEvent *pev;
+
+#ifdef _SECURE_LOG
     static char* ename[]=
     {
         "KeyPress",
@@ -472,6 +476,7 @@ _traceEvent (CallbackListPtr *pcbl, pointer nulldata, pointer calldata)
         "ButtonPress",
         "ButtonRelease",
     };
+#endif
 
     XDBG_RETURN_IF_FAIL (pei != NULL);