mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-18 22:35:39 +01:00
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>
This commit is contained in:
@@ -1688,7 +1688,7 @@ string GetWarnings(string strFor)
|
||||
return strStatusBar;
|
||||
else if (strFor == "rpc")
|
||||
return strRPC;
|
||||
assert(("GetWarnings() : invalid parameter", false));
|
||||
assert(!"GetWarnings() : invalid parameter");
|
||||
return "error";
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user