#include <dlog.h>
+// Using static inline function with no operation inside to cause compiler types check.
+// Using empty do {} while in WEBAPI_NOP macro will cause that when TIZEN_DEBUG_ENABLE flag
+// is turned off, then no types checking will be performed. This could cause problems when
+// developing code with this flag off and then enabling it.
+static inline int _noop_print(const char *fmt __attribute__((unused)), ...) { return 0; }
+#define WEBAPI_NOP(...) ({ do { _noop_print(__VA_ARGS__); } while (0); })
+
// Tizen 3.0 uses different debug flag (DLOG_DEBUG_ENABLE) which is always
// enabled, following code allows to disable logs with DLOG_DEBUG priority if
// TIZEN_DEBUG_ENABLE is not set.
} while (0); \
})
#else // TIZEN_DEBUG_ENABLE
-#define SECURE_LOG_(id, prio, tag, fmt, arg...) NOP(fmt, ##arg)
+#define SECURE_LOG_(id, prio, tag, fmt, arg...) WEBAPI_NOP(fmt, ##arg)
#endif // TIZEN_DEBUG_ENABLE
#include <cstring>