diff src/main.cpp @ 776:f64d738664f8 draft

fix warnings: expression result unused [-Wunused-value] In the assert()s take advantage of the fact that string constants ("string") are effectively of type 'const char []', which when used in an expression yield a non-NULL pointer. An assertion that should always fail can thus be formulated as: assert(!"fail); An assertion where a text message should be added to the expression can be written as such: assert("message" && expression); Signed-off-by: Giel van Schijndel <me@mortis.eu>
author Giel van Schijndel <me@mortis.eu>
date Fri, 24 Jun 2011 19:56:23 +0200
parents 84a79a23302f
children 361ab4abafbb
line wrap: on
line diff
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1688,7 +1688,7 @@
         return strStatusBar;
     else if (strFor == "rpc")
         return strRPC;
-    assert(("GetWarnings() : invalid parameter", false));
+    assert(!"GetWarnings() : invalid parameter");
     return "error";
 }