Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Developing U++ » U++ Developers corner » WARNINGS: LOG -> empty statement in RELEASE
Re: WARNINGS: LOG -> empty statement in RELEASE [message #31855 is a reply to message #31848] Thu, 31 March 2011 10:25 Go to previous messageGo to previous message
kohait00 is currently offline  kohait00
Messages: 939
Registered: July 2009
Location: Germany
Experienced Contributor
tested: works and produces exact same executable in OPTIMAL.

diff --git a/uppsrc/Core/Defs.h b/uppsrc/Core/Defs.h
index 3f2bbca..a299889 100644
--- a/uppsrc/Core/Defs.h
+++ b/uppsrc/Core/Defs.h
@@ -16,6 +16,8 @@
 	#pragma setlocale("C")
 #endif
 
+inline void Nop() {}
+
 bool    IsPanicMode();
 
 void    Panic(const char *msg);
@@ -34,8 +36,8 @@ void    PanicMessageBox(const char *title, const char *text);
 
 #else
 
-#define ASSERT_(x, msg)
-#define ASSERT(x)
+#define ASSERT_(x, msg) UPP::Nop()
+#define ASSERT(x) UPP::Nop()
 
 #endif
 
diff --git a/uppsrc/Core/Diag.h b/uppsrc/Core/Diag.h
index 0c22914..93a43b5 100644
--- a/uppsrc/Core/Diag.h
+++ b/uppsrc/Core/Diag.h
@@ -135,35 +135,35 @@ inline void UnlockLog() {}
 #define DDUMPM(x)        @
 #define DTIMING(x)       @
 
-#define ASSERT(x)
+#define ASSERT(x) UPP::Nop()
 
-#define DEBUGCODE(x)
+#define DEBUGCODE(x) UPP::Nop()
 
 inline void LOGF(const char *format, ...) {}
 
-#define LOG(a)
-#define LOGBEGIN()
-#define LOGEND()
-#define LOGBLOCK(n)
-#define LOGHEXDUMP(s, a)
+#define LOG(a) UPP::Nop()
+#define LOGBEGIN() UPP::Nop()
+#define LOGEND() UPP::Nop()
+#define LOGBLOCK(n) UPP::Nop()
+#define LOGHEXDUMP(s, a) UPP::Nop()
 #define QUOTE(a)         a
-#define LOGSRCPOS()
-#define DUMP(a)
-#define DUMPC(a)
-#define DUMPCC(a)
-#define DUMPCCC(a)
-#define DUMPM(a)
-#define XASSERT(c, d)
-#define NEVER()
-#define NEVER_(msg)
-#define XNEVER(d)
+#define LOGSRCPOS() UPP::Nop()
+#define DUMP(a) UPP::Nop()
+#define DUMPC(a) UPP::Nop()
+#define DUMPCC(a) UPP::Nop()
+#define DUMPCCC(a) UPP::Nop()
+#define DUMPM(a) UPP::Nop()
+#define XASSERT(c, d) UPP::Nop()
+#define NEVER() UPP::Nop()
+#define NEVER_(msg) UPP::Nop()
+#define XNEVER(d) UPP::Nop()
 #define CHECK(c)         (c)
 #define XCHECK(c, d)     (c)
 
-#define TIMING(x)
-#define HITCOUNT(x)
-#define ACTIVATE_TIMING()
-#define DEACTIVATE_TIMING()
+#define TIMING(x) UPP::Nop()
+#define HITCOUNT(x) UPP::Nop()
+#define ACTIVATE_TIMING() UPP::Nop()
+#define DEACTIVATE_TIMING() UPP::Nop()
 
 #endif
 

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: svn: patches, sandbox
Next Topic: FEAT: Tcl as a plugin
Goto Forum:
  


Current Time: Mon Jun 10 19:35:20 CEST 2024

Total time taken to generate the page: 0.01184 seconds